Closed alexrashed closed 1 year ago
Hi there,
Thanks for the fine bug report! I'll probably fix this tomorrow.
Zsolt
I'll implement __eq__
in Werkzeug, checking if two auths are equal makes sense.
thanks @davidism!
@alexrashed, are you ok with having this fix in the next release of werkzeug?
Sure! Thanks, @davidism and @csernazs for tackling it. :)
Feel free to close this issue (or to keep it open until 2.3.1
is released).
2.3.1 has been released, the tests pass, so I'm closing this
With Werkzeug 2.3.0 the Authorization header parsing has been refactored quite a lot: https://github.com/pallets/werkzeug/commit/0bdf9bac15e2079abce098f9d105c4e207886319. Here's an excerpt from the changeset:
Unfortunately, this means that this class does not implement the
__eq__
dunder method, which breaks this equality check: https://github.com/csernazs/pytest-httpserver/blob/1df798a207f06772dc46a765d108a6edb0ab3f9b/pytest_httpserver/httpserver.py#L135-L136Here's an example which works with
pytest-httpserver==1.0.6
andWerkzeug==2.2.3
, but breaks withWerkzeug==2.3.0
:This could either be fixed by adjusting the matcher, or by adding the
__eq__
dunder method to Werkzeug'sAuthorization
class (which might be useful for others as well?).