Skip to content

Commit

Permalink
update deprecation versions
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Apr 3, 2020
1 parent f991a89 commit 4024a4a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
25 changes: 13 additions & 12 deletions src/flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,16 +1074,16 @@ def open_session(self, request):
we recommend replacing the :class:`session_interface`.
.. deprecated: 1.0
Will be removed in 1.1. Use ``session_interface.open_session``
instead.
Will be removed in 2.0. Use
``session_interface.open_session`` instead.
:param request: an instance of :attr:`request_class`.
"""

warnings.warn(
DeprecationWarning(
'"open_session" is deprecated and will be removed in 1.1. Use'
' "session_interface.open_session" instead.'
'"open_session" is deprecated and will be removed in'
' 2.0. Use "session_interface.open_session" instead.'
)
)
return self.session_interface.open_session(self, request)
Expand All @@ -1094,8 +1094,8 @@ def save_session(self, session, response):
method we recommend replacing the :class:`session_interface`.
.. deprecated: 1.0
Will be removed in 1.1. Use ``session_interface.save_session``
instead.
Will be removed in 2.0. Use
``session_interface.save_session`` instead.
:param session: the session to be saved (a
:class:`~werkzeug.contrib.securecookie.SecureCookie`
Expand All @@ -1105,8 +1105,8 @@ def save_session(self, session, response):

warnings.warn(
DeprecationWarning(
'"save_session" is deprecated and will be removed in 1.1. Use'
' "session_interface.save_session" instead.'
'"save_session" is deprecated and will be removed in'
' 2.0. Use "session_interface.save_session" instead.'
)
)
return self.session_interface.save_session(self, session, response)
Expand All @@ -1116,16 +1116,17 @@ def make_null_session(self):
this method we recommend replacing the :class:`session_interface`.
.. deprecated: 1.0
Will be removed in 1.1. Use ``session_interface.make_null_session``
instead.
Will be removed in 2.0. Use
``session_interface.make_null_session`` instead.
.. versionadded:: 0.7
"""

warnings.warn(
DeprecationWarning(
'"make_null_session" is deprecated and will be removed in 1.1. Use'
' "session_interface.make_null_session" instead.'
'"make_null_session" is deprecated and will be removed'
' in 2.0. Use "session_interface.make_null_session"'
" instead."
)
)
return self.session_interface.make_null_session(self)
Expand Down
10 changes: 5 additions & 5 deletions src/flask/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ def make_test_environ_builder(*args, **kwargs):
"""Create a :class:`flask.testing.EnvironBuilder`.
.. deprecated: 1.1
Will be removed in 1.2. Construct ``flask.testing.EnvironBuilder``
directly instead.
Will be removed in 2.0. Construct
``flask.testing.EnvironBuilder`` directly instead.
"""
warnings.warn(
DeprecationWarning(
'"make_test_environ_builder()" is deprecated and will be removed '
'in 1.2. Construct "flask.testing.EnvironBuilder" directly '
"instead."
'"make_test_environ_builder()" is deprecated and will be'
' removed in 2.0. Construct "flask.testing.EnvironBuilder"'
" directly instead."
)
)
return EnvironBuilder(*args, **kwargs)
Expand Down

0 comments on commit 4024a4a

Please sign in to comment.