diff --git a/Lib/typing.py b/Lib/typing.py index 2287f0521a3..ca05fb54bf4 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -2512,7 +2512,7 @@ def __enter__(self) -> 'TextIO': class _DeprecatedType(type): def __getattribute__(cls, name): - if name != "__dict__" and name in cls.__dict__: + if name not in ("__dict__", "__module__") and name in cls.__dict__: warnings.warn( f"{cls.__name__} is deprecated, import directly " f"from typing instead. {cls.__name__} will be removed "