You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new release of Flask 2.2 deprecates the before_first_request method, which results in a warning upon app creation.
dash 2.6.0
flask 2.2.0
Full stack trace:
MLVisualizationTools/dashbackend.py:79: in getDashApp
app = Dash(__name__, title=title, external_stylesheets=[theme], assets_folder=folder)
.tox/py38/lib/python3.8/site-packages/dash/dash.py:501: in __init__
self.init_app()
.tox/py38/lib/python3.8/site-packages/dash/dash.py:545: in init_app
self.server.before_first_request(self._setup_server)
.tox/py38/lib/python3.8/site-packages/flask/scaffold.py:[49](https://github.com/RobertJN64/MLVisualizationTools/runs/7633737039?check_suite_focus=true#step:5:50): in wrapper_func
return f(self, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Flask 'MLVisualizationTools.dashbackend'>
f = <bound method Dash._setup_server of <dash.dash.Dash object at 0x7f27a07a00[70](https://github.com/RobertJN64/MLVisualizationTools/runs/7633737039?check_suite_focus=true#step:5:71)>>
@setupmethod
def before_first_request(self, f: T_before_first_request) -> T_before_first_request:
"""Registers a function to be run before the first request to this
instance of the application.
The function will be called without any arguments and its return
value is ignored.
.. deprecated:: 2.2
Will be removed in Flask 2.3. Run setup code when creating
the application instead.
.. versionadded:: 0.8
"""
import warnings
> warnings.warn(
"'before_first_request' is deprecated and will be removed"
" in Flask 2.3. Run setup code while creating the"
" application instead.",
DeprecationWarning,
stacklevel=2,
)
E DeprecationWarning: 'before_first_request' is deprecated and will be removed in Flask 2.3. Run setup code while creating the application instead.
The text was updated successfully, but these errors were encountered:
The new release of Flask 2.2 deprecates the
before_first_request
method, which results in a warning upon app creation.Full stack trace:
The text was updated successfully, but these errors were encountered: