diff --git a/requirements-tests.txt b/requirements-tests.txt index 3f505e48e..f6252a9ad 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -21,7 +21,7 @@ stubdefaulter==0.1.0; python_version < "3.14" termcolor>=2.3 tomli==2.2.1; python_version < "3.11" tomlkit==0.13.3 -typing_extensions>=4.14.0rc1 +typing_extensions>=4.15.0rc1 uv==0.8.6 # Utilities for typeshed infrastructure scripts. diff --git a/stdlib/typing_extensions.pyi b/stdlib/typing_extensions.pyi index 71bf3d87d..4b217e748 100644 --- a/stdlib/typing_extensions.pyi +++ b/stdlib/typing_extensions.pyi @@ -120,6 +120,7 @@ __all__ = [ "clear_overloads", "dataclass_transform", "deprecated", + "disjoint_base", "Doc", "evaluate_forward_ref", "get_overloads", @@ -150,6 +151,7 @@ __all__ = [ "TypeGuard", "TypeIs", "TYPE_CHECKING", + "type_repr", "Never", "NoReturn", "ReadOnly", @@ -219,6 +221,7 @@ runtime = runtime_checkable Final: _SpecialForm def final(f: _F) -> _F: ... +def disjoint_base(cls: _TC) -> _TC: ... Literal: _SpecialForm @@ -616,7 +619,7 @@ TypeForm: _SpecialForm if sys.version_info >= (3, 14): from typing import evaluate_forward_ref as evaluate_forward_ref - from annotationlib import Format as Format, get_annotations as get_annotations + from annotationlib import Format as Format, get_annotations as get_annotations, type_repr as type_repr else: class Format(enum.IntEnum): VALUE = 1 @@ -684,6 +687,7 @@ else: format: Format | None = None, _recursive_guard: Container[str] = ..., ) -> AnnotationForm: ... + def type_repr(value: object) -> str: ... # PEP 661 class Sentinel: