Closed twm closed 1 year ago
Hello,
It's because it's deprecated, https://github.com/pallets/werkzeug/issues/2360#issuecomment-1081009270
Quick fix : Werkzeug==2.0.3
@SamirPS Thanks, that is more specific than the pin I was using!
Ultimately, it's because httpbin is unmaintained since 2018. :disappointed: I'll fix this by pinning for the moment and file another ticket to address the larger issue.
No problem, You can't use another library ?
@SamirPS Is there another implementation of httpbin? We ended up here because our integration test suite used to hit httpbin.org, but of course this required internet access and was flaky. Right now the tests run httpbin in a subprocess.
There's some value in having integration tests that do real I/O, but IMO some of what we are testing this way would be better done using in-memory techniques like treq.testing
.
Maybe we end up reimplementing the bits of httpbin we need in Twisted?
I've been doing this in my tests:
import werkzeug.wrappers
Response = werkzeug.wrappers.Response
werkzeug.wrappers.BaseResponse = Response # type: ignore[attr-defined]
...and doing it before I import httpbin
(I've been running httpbin
under WSGIResource
with some hacks).
EDIT: I'm running httpbin
in process, not as a separate process like the treq
tests are apparently doing
Where the werkzeug is localized the source code?
@SamirPS It's not — Werkzeug is used by httpbin, not treq.