@@ -3,14 +3,15 @@ from _collections_abc import dict_items, dict_keys, dict_values
3
3
from _typeshed import IdentityFunction , Unused
4
4
from collections .abc import Mapping
5
5
from 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
7
7
8
8
_T = TypeVar ("_T" )
9
9
_U = TypeVar ("_U" )
10
10
11
11
# Internal mypy fallback type for all typed dicts (does not exist at runtime)
12
12
# N.B. Keep this mostly in sync with typing(_extensions)._TypedDict
13
13
@type_check_only
14
+ @deprecated ("mypy_extensions._TypedDict package is deprecated" )
14
15
class _TypedDict (Mapping [str , object ], metaclass = abc .ABCMeta ):
15
16
__total__ : ClassVar [bool ]
16
17
# Unlike typing(_extensions).TypedDict,
@@ -37,6 +38,7 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
37
38
# supposedly incompatible definitions of `__or__` and `__ior__`:
38
39
def __ior__ (self , value : Self , / ) -> Self : ... # type: ignore[misc]
39
40
41
+ @deprecated ("mypy_extensions.TypedDict is deprecated, use typing.TypedDict instead" )
40
42
def TypedDict (typename : str , fields : dict [str , type [Any ]], total : bool = ...) -> type [dict [str , Any ]]: ...
41
43
@overload
42
44
def Arg (type : _T , name : str | None = ...) -> _T : ...
@@ -65,6 +67,7 @@ def KwArg() -> Any: ...
65
67
66
68
# Return type that indicates a function does not return.
67
69
# Deprecated: Use typing.NoReturn instead.
70
+ @deprecated ("mypy_extensions.NoReturn is deprecated, use typing.NoReturn or typing.Never instead" )
68
71
class NoReturn : ...
69
72
70
73
# This is consistent with implementation. Usage intends for this as
0 commit comments