extend deprecation for renamed send_file params
This commit is contained in:
parent
48f2afbf90
commit
15a3e82823
2 changed files with 13 additions and 4 deletions
|
|
@ -20,6 +20,15 @@ Unreleased
|
||||||
- The same blueprint cannot be registered with the same name. Use
|
- The same blueprint cannot be registered with the same name. Use
|
||||||
``name=`` when registering to specify a unique name.
|
``name=`` when registering to specify a unique name.
|
||||||
|
|
||||||
|
- Some parameters in ``send_file`` and ``send_from_directory`` were
|
||||||
|
renamed in 2.0. The deprecation period for the old names is extended
|
||||||
|
to 2.2. Be sure to test with deprecation warnings visible.
|
||||||
|
|
||||||
|
- ``attachment_filename`` is renamed to ``download_name``.
|
||||||
|
- ``cache_timeout`` is renamed to ``max_age``.
|
||||||
|
- ``add_etags`` is renamed to ``etag``.
|
||||||
|
- ``filename`` is renamed to ``path``.
|
||||||
|
|
||||||
|
|
||||||
Version 2.0.2
|
Version 2.0.2
|
||||||
-------------
|
-------------
|
||||||
|
|
|
||||||
|
|
@ -452,7 +452,7 @@ def _prepare_send_file_kwargs(
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"The 'attachment_filename' parameter has been renamed to"
|
"The 'attachment_filename' parameter has been renamed to"
|
||||||
" 'download_name'. The old name will be removed in Flask"
|
" 'download_name'. The old name will be removed in Flask"
|
||||||
" 2.1.",
|
" 2.2.",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
stacklevel=3,
|
stacklevel=3,
|
||||||
)
|
)
|
||||||
|
|
@ -461,7 +461,7 @@ def _prepare_send_file_kwargs(
|
||||||
if cache_timeout is not None:
|
if cache_timeout is not None:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"The 'cache_timeout' parameter has been renamed to"
|
"The 'cache_timeout' parameter has been renamed to"
|
||||||
" 'max_age'. The old name will be removed in Flask 2.1.",
|
" 'max_age'. The old name will be removed in Flask 2.2.",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
stacklevel=3,
|
stacklevel=3,
|
||||||
)
|
)
|
||||||
|
|
@ -470,7 +470,7 @@ def _prepare_send_file_kwargs(
|
||||||
if add_etags is not None:
|
if add_etags is not None:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"The 'add_etags' parameter has been renamed to 'etag'. The"
|
"The 'add_etags' parameter has been renamed to 'etag'. The"
|
||||||
" old name will be removed in Flask 2.1.",
|
" old name will be removed in Flask 2.2.",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
stacklevel=3,
|
stacklevel=3,
|
||||||
)
|
)
|
||||||
|
|
@ -666,7 +666,7 @@ def send_from_directory(
|
||||||
if filename is not None:
|
if filename is not None:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
"The 'filename' parameter has been renamed to 'path'. The"
|
"The 'filename' parameter has been renamed to 'path'. The"
|
||||||
" old name will be removed in Flask 2.1.",
|
" old name will be removed in Flask 2.2.",
|
||||||
DeprecationWarning,
|
DeprecationWarning,
|
||||||
stacklevel=2,
|
stacklevel=2,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue