made some minor changes in provider.py
This commit is contained in:
parent
bc4a3c9484
commit
8cb6811a7b
1 changed files with 14 additions and 14 deletions
|
|
@ -186,8 +186,8 @@ class DefaultJSONProvider(JSONProvider):
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"Setting 'json_encoder' on the app or a blueprint is"
|
"""Setting 'json_encoder' on the app or a blueprint is
|
||||||
" deprecated and will be removed in Flask 2.3."
|
deprecated and will be removed in Flask 2.3."""
|
||||||
" Customize 'app.json' instead.",
|
" Customize 'app.json' instead.",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
)
|
)
|
||||||
|
|
@ -205,9 +205,9 @@ class DefaultJSONProvider(JSONProvider):
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"The 'JSON_AS_ASCII' config key is deprecated and will"
|
"""The 'JSON_AS_ASCII' config key is deprecated and will
|
||||||
" be removed in Flask 2.3. Set 'app.json.ensure_ascii'"
|
be removed in Flask 2.3. Set 'app.json.ensure_ascii'
|
||||||
" instead.",
|
instead.""",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|
@ -245,9 +245,9 @@ class DefaultJSONProvider(JSONProvider):
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"Setting 'json_decoder' on the app or a blueprint is"
|
"""Setting 'json_decoder' on the app or a blueprint is
|
||||||
" deprecated and will be removed in Flask 2.3."
|
deprecated and will be removed in Flask 2.3.
|
||||||
" Customize 'app.json' instead.",
|
Customize 'app.json' instead.""",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
)
|
)
|
||||||
kwargs.setdefault("cls", cls)
|
kwargs.setdefault("cls", cls)
|
||||||
|
|
@ -279,9 +279,9 @@ class DefaultJSONProvider(JSONProvider):
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"The 'JSONIFY_PRETTYPRINT_REGULAR' config key is"
|
"""The 'JSONIFY_PRETTYPRINT_REGULAR' config key is
|
||||||
" deprecated and will be removed in Flask 2.3. Set"
|
deprecated and will be removed in Flask 2.3. Set
|
||||||
" 'app.json.compact' instead.",
|
'app.json.compact' instead.""",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
)
|
)
|
||||||
compact: bool | None = not pretty
|
compact: bool | None = not pretty
|
||||||
|
|
@ -297,9 +297,9 @@ class DefaultJSONProvider(JSONProvider):
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"The 'JSONIFY_MIMETYPE' config key is deprecated and"
|
"""he 'JSONIFY_MIMETYPE' config key is deprecated and
|
||||||
" will be removed in Flask 2.3. Set 'app.json.mimetype'"
|
will be removed in Flask 2.3. Set 'app.json.mimetype'
|
||||||
" instead.",
|
instead.""",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue