auth0-python-api-samples icon indicating copy to clipboard operation
auth0-python-api-samples copied to clipboard

Flask example no longer compatible with flask 2.2

Open william-richard opened this issue 3 years ago • 0 comments

Hi Auth0!

I was just upgrading my app to Flask 2.2, and I got an error about being able to import _request_ctx_stack. It looks like that variable was removed in flask 2.2

  • 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
    • 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.

https://flask.palletsprojects.com/en/2.2.x/changes/

Can you please update the example to be compatible with the latest flask release? I'm not familiar with flask extension maintenance, so I'm not sure how to fix the issue.

Thanks!

william-richard avatar Sep 09 '22 20:09 william-richard