-
Notifications
You must be signed in to change notification settings - Fork 44
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
before_(app_)first_request
deprecation and removal in Flask v2.3
#171
before_(app_)first_request
deprecation and removal in Flask v2.3
#171
Comments
11 repositories affected by this.
Some usefull resources:
|
* allows to pass entry points to execute functions just after the app is instantiated * closes inveniosoftware#171
* replaced by init_functions entry point * closes inveniosoftware/invenio-base#171
NOTES:
|
I would say yes (at least from a quick search). The main difference with the I think whenever we're using a |
Good to know. thank you. Should i include those examples in the affected list? Is the proposed method to fix that DeprecationWarning still under discussion or can i go further and apply it? |
Yes, I think they're good candidates for this type of logic refactoring.
#172 and inveniosoftware/invenio-app#88 are the "leading" implementations. Personally, I'm still a bit hesitant about the naming (I like more the An alternative to adding yet another entrypoint, would be to move the logic in the extensions and introduce an optional |
@slint #i-would-like-to-refactore #if-we-not-refactore-and-remove-classy #rename-entrypoint #structural-problem SIDENOTE: the This change would affect code like in invenio-accounts SIDENOTE: is this in invenio-administration the example that it is not possible to replace all |
#i-would-like-to-refactore The package was not refactored for a long time. I would like to apply the common invenio structure with the ext.py and proxies.py files. Migrate to setup.cfg and black. Further, as i researched, the +1 for updating the structure and modernizing. What we have to keep in mind is that this is
We can remove
I have a feeling that entrypoints are a bit "esoteric" at this point to how we do things in Invenio... Would it make sense to explore more towards what the discussion in Flask also suggested, i.e. a
This is a bigger problem in the way we integrate I think we should/could solve this problem as well as part of this refactoring here.
Yes, these two modules are very tightly coupled, and as an extension any module that adds to the user setting pages. I think before releasing any breaking changes we should first pin the dependency in
This one looks replaceable actually, but depends on some "local" variables (i.e. |
#about-flask-menu the rest tomorrow |
@slint |
Correct: no more support to If it is easy to fix |
@slint |
In Flask v2.2
before_(app_)first_request
was deprecated and will be removed in v2.3.We are currently using this through various modules for registering menus or other special cases:
before_first_request
before_app_first_request
Blueprint.record_once
(seebefore_(app_)first_request
deprecation and removal in Flask v2.3 #171 (comment) 👇 )We should either:
Flask < 2.3
in this moduleinvenio-app
lifecycle to introduce a similar mechanism.The text was updated successfully, but these errors were encountered: