Skip to content

Commit

Permalink
@deprecated: will be in warnings, not typing (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra authored Nov 8, 2023
1 parent f9f257c commit 7af82f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ Decorators

.. decorator:: deprecated(msg, *, category=DeprecationWarning, stacklevel=1)

See :pep:`702`. Experimental; not yet part of the standard library.
See :pep:`702`. In the :mod:`warnings` module since Python 3.13.

.. versionadded:: 4.5.0

Expand Down
4 changes: 2 additions & 2 deletions src/typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2282,8 +2282,8 @@ def method(self) -> None:
return arg


if hasattr(typing, "deprecated"):
deprecated = typing.deprecated
if hasattr(warnings, "deprecated"):
deprecated = warnings.deprecated
else:
_T = typing.TypeVar("_T")

Expand Down

0 comments on commit 7af82f9

Please sign in to comment.