Skip to content
Myr

extend deprecation for renamed send_file params

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent 48f2afb · Browse files · 2 files+13 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+13 added−4 removed

  • other:+13 added−4 removed

2 files+13 added−4 removed

modified:src/flask/helpers.py+4 added-4 removed
450 unmodified lines
451 if attachment_filename is not None:452 warnings.warn(453 "The 'attachment_filename' parameter has been renamed to"454 " 'download_name'. The old name will be removed in Flask"455 " 2.1.",455 " 2.2.",456 DeprecationWarning,457 stacklevel=3,458 )459 download_name = attachment_filename460461 if cache_timeout is not None:462 warnings.warn(463 "The 'cache_timeout' parameter has been renamed to"464 " 'max_age'. The old name will be removed in Flask 2.1.",464 " 'max_age'. The old name will be removed in Flask 2.2.",465 DeprecationWarning,466 stacklevel=3,467 )468 max_age = cache_timeout469470 if add_etags is not None:471 warnings.warn(472 "The 'add_etags' parameter has been renamed to 'etag'. The"473 " old name will be removed in Flask 2.1.",473 " old name will be removed in Flask 2.2.",474 DeprecationWarning,475 stacklevel=3,476 )477 etag = add_etags
187 unmodified lines
665 """666 if filename is not None:667 warnings.warn(668 "The 'filename' parameter has been renamed to 'path'. The"669 " old name will be removed in Flask 2.1.",669 " old name will be removed in Flask 2.2.",670 DeprecationWarning,671 stacklevel=2,672 )673 path = filename
117 unmodified lines
modified:CHANGES.rst+9 added
18 unmodified lines
19 instead.20 - The same blueprint cannot be registered with the same name. Use21 ``name=`` when registering to specify a unique name.2223- Some parameters in ``send_file`` and ``send_from_directory`` were24 renamed in 2.0. The deprecation period for the old names is extended25 to 2.2. Be sure to test with deprecation warnings visible.2627 - ``attachment_filename`` is renamed to ``download_name``.28 - ``cache_timeout`` is renamed to ``max_age``.29 - ``add_etags`` is renamed to ``etag``.30 - ``filename`` is renamed to ``path``.313233Version 2.0.234-------------3536Released 2021-10-04
1178 unmodified lines