Skip to content

Commit 65860e5

Browse files
authored
Deprecate several things in mypy_extensions (#13874)
See python/mypy_extensions@1.0.0...1.1.0 on what was deprecated.
1 parent ae57d69 commit 65860e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stubs/mypy-extensions/mypy_extensions.pyi

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ from _collections_abc import dict_items, dict_keys, dict_values
33
from _typeshed import IdentityFunction, Unused
44
from collections.abc import Mapping
55
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
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")
1415
class _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")
4042
def TypedDict(typename: str, fields: dict[str, type[Any]], total: bool = ...) -> type[dict[str, Any]]: ...
4143
@overload
4244
def 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")
6871
class NoReturn: ...
6972

7073
# This is consistent with implementation. Usage intends for this as

0 commit comments

Comments
 (0)