-
-
Notifications
You must be signed in to change notification settings - Fork 16.1k
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
custom converter with flask-login doesn't have access to session #4053
Comments
This is because of #3776, which asked to make the matched request available when loading the session object. However, that means the session object isn't available when matching the request. It's impossible to have both. I think it makes more sense to have the session available to custom converters, so I'll roll back #3794. |
After rolling back #3794, if you're writing a custom session loader and need the endpoint, then you can call: _request_ctx_stack.top.match_request() If you need both, you'll need to write your converters so they will still match without the session, then call |
Alright, thanks for the workaround. |
Hi there,
With the flask 2.0.0 upgrade I get the following backtrace in a test suite:
The pseudo code in the falling test, looks like:
The session access that failed is done in the
installation
converter and it looks like:Environment:
If you need more info, just ask :)
The text was updated successfully, but these errors were encountered: