From 9a2c4bc9ceef5d3bcf990856a685dcd7aff77746 Mon Sep 17 00:00:00 2001 From: Daniel Sperber Date: Wed, 14 Jan 2026 12:06:46 +0100 Subject: [PATCH 1/2] Remove no_type_check_decorator from _typing_names --- src/typing_extensions.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/typing_extensions.py b/src/typing_extensions.py index 9dd8eac4..d0442cea 100644 --- a/src/typing_extensions.py +++ b/src/typing_extensions.py @@ -4298,11 +4298,14 @@ def type_repr(value): "ValuesView", "cast", "no_type_check", - "no_type_check_decorator", # This is private, but it was defined by typing_extensions for a long time # and some users rely on it. "_AnnotatedAlias", ] +# Breakpoint: https://github.com/python/cpython/pull/133602 +if sys.version_info < (3, 15, 0): + _typing_names.append("no_type_check_decorator") + __all__.append("no_type_check_decorator") globals().update( {name: getattr(typing, name) for name in _typing_names if hasattr(typing, name)} ) @@ -4311,7 +4314,3 @@ def type_repr(value): Generic = typing.Generic ForwardRef = typing.ForwardRef Annotated = typing.Annotated - -# Breakpoint: https://github.com/python/cpython/pull/133602 -if sys.version_info < (3, 15, 0): - __all__.append("no_type_check_decorator") From adf7fc9e60921e346743dbf3224acb0aeff3090c Mon Sep 17 00:00:00 2001 From: Daniel Sperber Date: Wed, 14 Jan 2026 12:13:53 +0100 Subject: [PATCH 2/2] Update src/typing_extensions.py Co-authored-by: Alex Waygood --- src/typing_extensions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/typing_extensions.py b/src/typing_extensions.py index d0442cea..20c331ee 100644 --- a/src/typing_extensions.py +++ b/src/typing_extensions.py @@ -4302,10 +4302,12 @@ def type_repr(value): # and some users rely on it. "_AnnotatedAlias", ] + # Breakpoint: https://github.com/python/cpython/pull/133602 if sys.version_info < (3, 15, 0): _typing_names.append("no_type_check_decorator") __all__.append("no_type_check_decorator") + globals().update( {name: getattr(typing, name) for name in _typing_names if hasattr(typing, name)} )