File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 2727else :
2828
2929 def deprecated (reason : str = "" ) -> object :
30- raise AssertionError (
31- "This decorator should only be used to indicate that overloads are deprecated"
32- )
33- # once py<3.13 is no longer supported, or when somebody wants to use decorators
34- # to deprecated, we can consider adapting this function to raise warnings
35- # at runtime
30+ # This decorator should only be used to indicate that overloads are deprecated
31+ # once py<3.13 is no longer supported, or when somebody wants to use @deprecated
32+ # for runtime warning, we can consider adapting this decorator to support that
33+ def decorator (func : object ) -> object :
34+ return func
35+
36+ return decorator
3637
3738
3839CALLABLE_RAISES = PytestPendingDeprecationWarning (
Original file line number Diff line number Diff line change @@ -164,8 +164,11 @@ def test_deprecated_call_ret(self) -> None:
164164 PytestPendingDeprecationWarning ,
165165 match = (
166166 wrap_escape (
167- "The callable form of pytest.deprecated_call is deprecated.\n "
167+ "The callable form of pytest.deprecated_call will be deprecated in a future version .\n "
168168 "Use `with pytest.deprecated_call():` instead."
169+ "Full deprecation will not be made until there's a tool to automatically update"
170+ " code to use the context-manager form.\n "
171+ "See https://docs.pytest.org/en/stable/reference/deprecations.html#legacy-callable-form-of-raises-warns-and-deprecated-call"
169172 )
170173 ),
171174 ):
@@ -297,8 +300,11 @@ def test_function(self) -> None:
297300 PytestPendingDeprecationWarning ,
298301 match = (
299302 wrap_escape (
300- "The callable form of pytest.warns is deprecated.\n "
303+ "The callable form of pytest.warns will be deprecated in a future version .\n "
301304 "Use `with pytest.warns(...):` instead."
305+ "Full deprecation will not be made until there's a tool to automatically update"
306+ " code to use the context-manager form.\n "
307+ "See https://docs.pytest.org/en/stable/reference/deprecations.html#legacy-callable-form-of-raises-warns-and-deprecated-call"
302308 )
303309 ),
304310 ):
You can’t perform that action at this time.
0 commit comments