This PR should get httpbin working with Flask 3.0. The other recent changes to get Flask 2.0 working in main already 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:
Move to using the WWWAuthenticate constructor that was introduced in werkzeug 2.0 and became the only supported interface in werkzeug 3.0.
Move to Authorization.from_header which was introduced in werkzeug 2.3 and is the only supported interface in werkzeug 3.0. parse_authorization_header was already an alias for this in versions of werkzeug we support.
We were doing some unneeded byte conversion for the Location header on redirect. This was a legacy change from 10 years ago to accommodate werkzeug casting all headers to str so we ensured they were utf-8 bytes. werkzeug stopped this conversion in 3.0 and we already have a Python 3 utf-8 string as input. We should be able drop this safely with our support range.
This PR should get httpbin working with Flask 3.0. The other recent changes to get Flask 2.0 working in
main
already 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_header
which was introduced in werkzeug 2.3 and is the only supported interface in werkzeug 3.0.parse_authorization_header
was already an alias for this in versions of werkzeug we support.str
so we ensured they wereutf-8
bytes. werkzeug stopped this conversion in 3.0 and we already have a Python 3utf-8
string as input. We should be able drop this safely with our support range.