consistent versions and deprecation messages
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 16f51ef · Browse files · 4 files·+26 added−23 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+26 added−23 removed
- other:+26 added−23 removed
Provenance
- Commit
8ab4967- Tree
0d4006a- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
16f51ef
4 files changed+26 added−23 removed
modified:src/flask/json/__init__.py+13 added-12 removed
101 unmodified lines102 or defaults.103 :param kwargs: Extra arguments passed to :func:`json.dumps`.104 105 .. versionchanged:: 2.0106- ``encoding`` is deprecated and will be removed in 2.1.106+ ``encoding`` is deprecated and will be removed in Flask 2.1.107 108 .. versionchanged:: 1.0.3109 ``app`` can be passed directly, rather than requiring an app110 context for configuration.3 unmodified lines114 rv = _json.dumps(obj, **kwargs)115 116 if encoding is not None:117 warnings.warn(118- "'encoding' is deprecated and will be removed in 2.1.",118+ "'encoding' is deprecated and will be removed in Flask 2.1.",119 DeprecationWarning,120 stacklevel=2,121 )122 16 unmodified lines139 :param kwargs: Extra arguments passed to :func:`json.dump`.140 141 .. versionchanged:: 2.0142 Writing to a binary file, and the ``encoding`` argument, is143- deprecated and will be removed in 2.1.143+ deprecated and will be removed in Flask 2.1.144 """145 _dump_arg_defaults(kwargs, app=app)146 encoding = kwargs.pop("encoding", None)147 show_warning = encoding is not None6 unmodified lines154 155 if show_warning:156 warnings.warn(157 "Writing to a binary file, and the 'encoding' argument, is"158- " deprecated and will be removed in 2.1.",158+ " deprecated and will be removed in Flask 2.1.",159 DeprecationWarning,160 stacklevel=2,161 )162 11 unmodified lines174 or defaults.175 :param kwargs: Extra arguments passed to :func:`json.loads`.176 177 .. versionchanged:: 2.0178- ``encoding`` is deprecated and will be removed in 2.1. The data179- must be a string or UTF-8 bytes.178+ ``encoding`` is deprecated and will be removed in Flask 2.1. The179+ data must be a string or UTF-8 bytes.180 181 .. versionchanged:: 1.0.3182 ``app`` can be passed directly, rather than requiring an app183 context for configuration.2 unmodified lines186 encoding = kwargs.pop("encoding", None)187 188 if encoding is not None:189 warnings.warn(190- "'encoding' is deprecated and will be removed in 2.1. The"191- " data must be a string or UTF-8 bytes.",190+ "'encoding' is deprecated and will be removed in Flask 2.1."191+ " The data must be a string or UTF-8 bytes.",192 DeprecationWarning,193 stacklevel=2,194 )195 14 unmodified lines210 or defaults.211 :param kwargs: Extra arguments passed to :func:`json.load`.212 213 .. versionchanged:: 2.0214- ``encoding`` is deprecated and will be removed in 2.1. The file215- must be text mode, or binary mode with UTF-8 bytes.214+ ``encoding`` is deprecated and will be removed in Flask 2.1. The215+ file must be text mode, or binary mode with UTF-8 bytes.216 """217 _load_arg_defaults(kwargs, app=app)218 encoding = kwargs.pop("encoding", None)219 220 if encoding is not None:221 warnings.warn(222- "'encoding' is deprecated and will be removed in 2.1. The"223- " file must be text mode, or binary mode with UTF-8 bytes.",222+ "'encoding' is deprecated and will be removed in Flask 2.1."223+ " The file must be text mode, or binary mode with UTF-8"224+ " bytes.",225 DeprecationWarning,226 stacklevel=2,227 )228 105 unmodified linesmodified:src/flask/cli.py+3 added-2 removed
96 unmodified lines97 98 if "script_info" in sig.parameters:99 warnings.warn(100 "The 'script_info' argument is deprecated and will not be"101- " passed to the app factory function in 2.1.",101+ " passed to the app factory function in Flask 2.1.",102 DeprecationWarning,103 )104 kwargs["script_info"] = script_info105 3 unmodified lines109 and next(iter(sig.parameters.values())).default is inspect.Parameter.empty110 ):111 warnings.warn(112 "Script info is deprecated and will not be passed as the"113- " single argument to the app factory function in 2.1.",113+ " single argument to the app factory function in Flask"114+ " 2.1.",115 DeprecationWarning,116 )117 args.append(script_info)118 866 unmodified linesmodified:src/flask/helpers.py+9 added-8 removed
444 unmodified lines445 **kwargs,446 ):447 if attachment_filename is not None:448 warnings.warn(449- "The 'attachment_filename' parameter has been renamed to 'download_name'."450- " The old name will be removed in Flask 2.1.",449+ "The 'attachment_filename' parameter has been renamed to"450+ " 'download_name'. The old name will be removed in Flask"451+ " 2.1.",452 DeprecationWarning,453 stacklevel=3,454 )455 download_name = attachment_filename456 457 if cache_timeout is not None:458 warnings.warn(458- "The 'cache_timeout' parameter has been renamed to 'max_age'. The old name"459- " will be removed in Flask 2.1.",459+ "The 'cache_timeout' parameter has been renamed to"460+ " 'max_age'. The old name will be removed in Flask 2.1.",461 DeprecationWarning,462 stacklevel=3,463 )464 max_age = cache_timeout465 466 if add_etags is not None:467 warnings.warn(467- "The 'add_etags' parameter has been renamed to 'etag'. The old name will be"468- " removed in Flask 2.1.",468+ "The 'add_etags' parameter has been renamed to 'etag'. The"469+ " old name will be removed in Flask 2.1.",470 DeprecationWarning,471 stacklevel=3,472 )473 etag = add_etags75 unmodified lines549 ``max_age`` replaces the ``cache_timeout`` parameter.550 ``conditional`` is enabled and ``max_age`` is not set by551 default.552 552- .. versionchanged:: 2.0.0553+ .. versionchanged:: 2.0554 ``etag`` replaces the ``add_etags`` parameter. It can be a555 string to use instead of generating one.556 557 .. versionchanged:: 2.071 unmodified lines629 :return: A safe path, otherwise ``None``.630 """631 warnings.warn(632 "'flask.helpers.safe_join' is deprecated and will be removed in"632- " 2.1. Use 'werkzeug.utils.safe_join' instead.",633+ " Flask 2.1. Use 'werkzeug.utils.safe_join' instead.",634 DeprecationWarning,635 stacklevel=2,636 )637 path = werkzeug.utils.safe_join(directory, *pathnames)144 unmodified linesmodified:src/flask/scaffold.py+1 added-1 removed
54 unmodified lines55 :param root_path: The path that static, template, and resource files56 are relative to. Typically not set, it is discovered based on57 the ``import_name``.58 59- .. versionadded:: 2.0.059+ .. versionadded:: 2.060 """61 62 name: str63 _static_folder = None801 unmodified lines