-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Flask extension compatible with Flask>=2.2.0
Flask 2.2.0 deprecated the context stack in favour of using Python ContextVar, and introduced a fake stack for some sort of backward compatibility. However, it is not compatible enough for us as the existing code would blindly push context replacing any existing one, which will break application code. The extension now does the recommended action of storing its data on flask.g - in this case we store the context that needs to be popped since _app_ctx_stack is deprecated. There are no existing tests for this extension but I've tested it locally to my satisfaction. Fixes: #24
- Loading branch information
Showing
1 changed file
with
34 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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