authlib
authlib copied to clipboard
flask: _app_ctx_stack is deprecated
Is your feature request related to a problem? Please describe.
Flask 2.2 has deprecated app_ctx_stack.
Describe the solution you'd like
flask_client integration should ideally load without deprecation warnings.
Describe alternatives you've considered
None yet.
Additional context
https://flask.palletsprojects.com/en/2.2.x/changes/?highlight=_app_ctx_stack
The app and request contexts are managed using Python context vars directly rather than Werkzeug’s LocalStack. This should result in better performance and memory use. [#4682](https://github.com/pallets/flask/pull/4682)
Extension maintainers, be aware that _app_ctx_stack.top and _request_ctx_stack.top are deprecated. Store data on g instead using a unique prefix, like g._extension_name_attr.
Would be nice to have this fix back ported to 0.15 as well since we are currently on that and it will take some effort to upgrade to v1.0 (with the breaking changes there)
fixed in https://github.com/lepture/authlib/commit/cd66b369d141ba817b8ef0b760fae99f74b8cd86
@lepture Thanks for the fix! Any idea when 1.2.0 will be released with this?