-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests are failing with the latest werkzeug 2.0.1 #647
Comments
sorry, previous comment was wrong. This is caused by a change in werkzeug. I bisected it, and the problematic commit I think is pallets/werkzeug@2cd4fa9 - this was a little hard to debug because there's a commit in the history that seems to break werkzeug entirely with Python 3.10 at least, I had to use an 'alternative history' branch where I fixed the bug in that commit to do a successful bisect. As best I can tell, something somewhere in there is messing with responses before they're returned. for e.g. the failure in |
@davidism ahoy! Hope you don't mind the ping. Any idea what's going on here, as you wrote the commit that seems to have caused it? It's a big commit and I'm struggling to pinpoint the issue. The stuff about |
As far as I understand it, To debug this, I'd set a breakpoint in the |
yeah, I'm not saying that part actually is the problem, it's just the most obvious thing I saw on a brief look through the commit. Most of the tests are of httpbin code that very explicitly intends to get relative URLs.
where using Your suggested next step was probably what I was gonna do next too, but I figured instead of flailing around blindly at "likely suspects" it'd be an idea to see if the person who wrote it could spot the issue :) |
OK, so I added some debug prints and indeed the issue is |
Ah. Heh. Turns out it's really pretty simple, and I dunno why I didn't notice it before...httpbin's
which obviously stopped 'working' when the logic moved to |
…labs#647) In werkzeug 2.0.0 and later, the Location header autocorrection moved from BaseResponse to Response, so we need to set `autocorrect_location_header = False` in `Response` not `BaseResponse`. For now let's just set it in both to be safe, this doesn't cause any errors at least with 1.0.1 and 2.0.1. Signed-off-by: Adam Williamson <awilliam@redhat.com>
The text was updated successfully, but these errors were encountered: