diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2024-02-16 21:46:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-16 21:46:48 (GMT) |
commit | 83c7dd5200bae16d2f2f942fb0a826723d3023cc (patch) | |
tree | 9f61aa1b722bd4d42767432f8c523a3314ade947 /Lib/typing.py | |
parent | f383ca1a6fa1a2a83c8c1a0e56cf997c77fa2893 (diff) | |
download | cpython-83c7dd5200bae16d2f2f942fb0a826723d3023cc.zip cpython-83c7dd5200bae16d2f2f942fb0a826723d3023cc.tar.gz cpython-83c7dd5200bae16d2f2f942fb0a826723d3023cc.tar.bz2 |
[3.12] gh-115570: Fix DeprecationWarnings in test_typing (#115571) (#115574)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diffstat (limited to 'Lib/typing.py')
-rw-r--r-- | Lib/typing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/typing.py b/Lib/typing.py index cbd4ce8..1e4c725 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -3256,11 +3256,11 @@ class TextIO(IO[str]): class _DeprecatedType(type): def __getattribute__(cls, name): - if name not in ("__dict__", "__module__") and name in cls.__dict__: + if name not in {"__dict__", "__module__", "__doc__"} and name in cls.__dict__: warnings.warn( f"{cls.__name__} is deprecated, import directly " f"from typing instead. {cls.__name__} will be removed " - "in Python 3.12.", + "in Python 3.13.", DeprecationWarning, stacklevel=2, ) |