diff --git a/CHANGES.rst b/CHANGES.rst index 4d6fa62d..7c8d279b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,6 +20,15 @@ Unreleased - The same blueprint cannot be registered with the same name. Use ``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 ------------- diff --git a/src/flask/helpers.py b/src/flask/helpers.py index 20701e2a..d67e59e2 100644 --- a/src/flask/helpers.py +++ b/src/flask/helpers.py @@ -452,7 +452,7 @@ def _prepare_send_file_kwargs( warnings.warn( "The 'attachment_filename' parameter has been renamed to" " 'download_name'. The old name will be removed in Flask" - " 2.1.", + " 2.2.", DeprecationWarning, stacklevel=3, ) @@ -461,7 +461,7 @@ def _prepare_send_file_kwargs( if cache_timeout is not None: warnings.warn( "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, stacklevel=3, ) @@ -470,7 +470,7 @@ def _prepare_send_file_kwargs( if add_etags is not None: warnings.warn( "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, stacklevel=3, ) @@ -666,7 +666,7 @@ def send_from_directory( if filename is not None: warnings.warn( "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, stacklevel=2, )