Skip to content
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

Fix compatibility with Flask 2.2.0+ #81

Merged
merged 5 commits into from
Jul 27, 2023

Conversation

idkw
Copy link
Contributor

@idkw idkw commented Jul 11, 2023

Fixes #80

Since Flask 2.2.0 before_first_request is deprecated. They recommend to run setup code when creating the application instead.

So this MR simply removes the injector code around before_first_request_funcs because they do no longer exist.

@idkw idkw changed the title Fix compatibility with Flask 2.3+ Fix compatibility with Flask 2.2.0+ Jul 11, 2023
@idkw
Copy link
Contributor Author

idkw commented Jul 11, 2023

Hi @jstasiak,

Do you think this can be merged and released when you have time to restore compatibility with the latest versions of flask (>= 2.2.0) ?

Thanks

@benmap-brex
Copy link

👍 thank you for the pr. Also running into this issue.

@jstasiak
Copy link
Collaborator

Thank you @idkw, I allowed myself to modify the branch a little to keep setup.py consistent with the new requirements and fix the tests.

There's one remaining build failure but it's not related to this patch so I'll merge it.

@jstasiak jstasiak merged commit b8da4e9 into python-injector:master Jul 27, 2023
0 of 7 checks passed
@jstasiak
Copy link
Collaborator

jstasiak commented Jul 27, 2023

Version 0.15.0 has just been released with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support flask >= 2.3
3 participants