made some minor changes in blueprints.py
This commit is contained in:
parent
8cb6811a7b
commit
94de1326f2
1 changed files with 19 additions and 19 deletions
|
|
@ -191,8 +191,8 @@ class Blueprint(Scaffold):
|
|||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"'bp.json_encoder' is deprecated and will be removed in Flask 2.3."
|
||||
" Customize 'app.json_provider_class' or 'app.json' instead.",
|
||||
"""'bp.json_encoder' is deprecated and will be removed in Flask 2.3.
|
||||
Customize 'app.json_provider_class' or 'app.json' instead.""",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
|
@ -203,8 +203,8 @@ class Blueprint(Scaffold):
|
|||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"'bp.json_encoder' is deprecated and will be removed in Flask 2.3."
|
||||
" Customize 'app.json_provider_class' or 'app.json' instead.",
|
||||
"""'bp.json_encoder' is deprecated and will be removed in Flask 2.3.
|
||||
Customize 'app.json_provider_class' or 'app.json' instead.'""",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
|
@ -225,8 +225,8 @@ class Blueprint(Scaffold):
|
|||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"'bp.json_decoder' is deprecated and will be removed in Flask 2.3."
|
||||
" Customize 'app.json_provider_class' or 'app.json' instead.",
|
||||
"""'bp.json_decoder' is deprecated and will be removed in Flask 2.3.
|
||||
Customize 'app.json_provider_class' or 'app.json' instead.""",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
|
@ -237,8 +237,8 @@ class Blueprint(Scaffold):
|
|||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"'bp.json_decoder' is deprecated and will be removed in Flask 2.3."
|
||||
" Customize 'app.json_provider_class' or 'app.json' instead.",
|
||||
"""'bp.json_decoder' is deprecated and will be removed in Flask 2.3.
|
||||
Customize 'app.json_provider_class' or 'app.json' instead.""",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
|
@ -285,14 +285,14 @@ class Blueprint(Scaffold):
|
|||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
f"The setup method '{f_name}' can no longer be called on"
|
||||
f" the blueprint '{self.name}'. It has already been"
|
||||
" registered at least once, any changes will not be"
|
||||
" applied consistently.\n"
|
||||
"Make sure all imports, decorators, functions, etc."
|
||||
" needed to set up the blueprint are done before"
|
||||
" registering it.\n"
|
||||
"This warning will become an exception in Flask 2.3.",
|
||||
f"""The setup method '{f_name}' can no longer be called on
|
||||
the blueprint '{self.name}'. It has already been
|
||||
registered at least once, any changes will not be
|
||||
applied consistently.\n
|
||||
Make sure all imports, decorators, functions, etc.
|
||||
needed to set up the blueprint are done before
|
||||
registering it.\n
|
||||
This warning will become an exception in Flask 2.3.""",
|
||||
UserWarning,
|
||||
stacklevel=3,
|
||||
)
|
||||
|
|
@ -631,9 +631,9 @@ class Blueprint(Scaffold):
|
|||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"'before_app_first_request' is deprecated and will be"
|
||||
" removed in Flask 2.3. Use 'record_once' instead to run"
|
||||
" setup code when registering the blueprint.",
|
||||
"""'before_app_first_request' is deprecated and will be
|
||||
removed in Flask 2.3. Use 'record_once' instead to run
|
||||
setup code when registering the blueprint.""",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue