Repository navigation
Support Flask 3.0 - #29
Merged
Merged
Conversation
jeffvanvoorst
approved these changes
Oct 7, 2023
jeffvanvoorst
left a comment
There was a problem hiding this comment.
Looks like a good fix. I wasn't aware of the details for .helpers.
| status_code = int(args["status_code"]) | ||
| if status_code >= 300 and status_code < 400: | ||
| response.status_code = status_code | ||
| response.headers["Location"] = args["url"].encode("utf-8") |
There was a problem hiding this comment.
Was this issue resolved in a later version of werkzeug? I am curious to understand why it is no longer necessary.
Member
Author
There was a problem hiding this comment.
I think that's covered in item 3 in the PR overview. Was there something more specific you were wondering about?
There was a problem hiding this comment.
No, thanks for pointing that out.
sigmavirus24
approved these changes
Oct 12, 2023
This was referenced Dec 9, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR should get httpbin working with Flask 3.0. The other recent changes to get Flask 2.0 working in
mainalready broke Flask<2.2.4 so I've updated the dependencies to correctly reflect what we're compatible with. This should also resolve #28.This PR changes three primary pieces:
Authorization.from_headerwhich was introduced in werkzeug 2.3 and is the only supported interface in werkzeug 3.0.parse_authorization_headerwas already an alias for this in versions of werkzeug we support.strso we ensured they wereutf-8bytes. werkzeug stopped this conversion in 3.0 and we already have a Python 3utf-8string as input. We should be able drop this safely with our support range.