@@ -3,14 +3,15 @@ from _collections_abc import dict_items, dict_keys, dict_values
33from _typeshed import IdentityFunction , Unused
44from collections .abc import Mapping
55from typing import Any , ClassVar , Generic , TypeVar , overload , type_check_only
6- from typing_extensions import Never , Self
6+ from typing_extensions import Never , Self , deprecated
77
88_T = TypeVar ("_T" )
99_U = TypeVar ("_U" )
1010
1111# Internal mypy fallback type for all typed dicts (does not exist at runtime)
1212# N.B. Keep this mostly in sync with typing(_extensions)._TypedDict
1313@type_check_only
14+ @deprecated ("mypy_extensions._TypedDict package is deprecated" )
1415class _TypedDict (Mapping [str , object ], metaclass = abc .ABCMeta ):
1516 __total__ : ClassVar [bool ]
1617 # Unlike typing(_extensions).TypedDict,
@@ -37,6 +38,7 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
3738 # supposedly incompatible definitions of `__or__` and `__ior__`:
3839 def __ior__ (self , value : Self , / ) -> Self : ... # type: ignore[misc]
3940
41+ @deprecated ("mypy_extensions.TypedDict is deprecated, use typing.TypedDict instead" )
4042def TypedDict (typename : str , fields : dict [str , type [Any ]], total : bool = ...) -> type [dict [str , Any ]]: ...
4143@overload
4244def Arg (type : _T , name : str | None = ...) -> _T : ...
@@ -65,6 +67,7 @@ def KwArg() -> Any: ...
6567
6668# Return type that indicates a function does not return.
6769# Deprecated: Use typing.NoReturn instead.
70+ @deprecated ("mypy_extensions.NoReturn is deprecated, use typing.NoReturn or typing.Never instead" )
6871class NoReturn : ...
6972
7073# This is consistent with implementation. Usage intends for this as
0 commit comments