diff --git a/stdlib/_typeshed/_type_checker_internals.pyi b/stdlib/_typeshed/_type_checker_internals.pyi index 375e997e2c93..8414837f7773 100644 --- a/stdlib/_typeshed/_type_checker_internals.pyi +++ b/stdlib/_typeshed/_type_checker_internals.pyi @@ -5,6 +5,7 @@ import sys import typing_extensions from _collections_abc import dict_items, dict_keys, dict_values +from _typeshed import AnnotationForm from abc import ABCMeta from collections.abc import Awaitable, Generator, Iterable, Mapping from typing import Any, ClassVar, Generic, TypeVar, overload @@ -28,6 +29,10 @@ class TypedDictFallback(Mapping[str, object], metaclass=ABCMeta): if sys.version_info >= (3, 13): __readonly_keys__: ClassVar[frozenset[str]] __mutable_keys__: ClassVar[frozenset[str]] + if sys.version_info >= (3, 15): + # PEP 728 + __closed__: ClassVar[bool | None] + __extra_items__: ClassVar[AnnotationForm] def copy(self) -> typing_extensions.Self: ... # Using Never so that only calls using mypy plugin hook that specialize the signature diff --git a/stdlib/typing.pyi b/stdlib/typing.pyi index 2018a835c632..e947df516860 100644 --- a/stdlib/typing.pyi +++ b/stdlib/typing.pyi @@ -1082,6 +1082,10 @@ class _TypedDict(Mapping[str, object], metaclass=ABCMeta): if sys.version_info >= (3, 13): __readonly_keys__: ClassVar[frozenset[str]] __mutable_keys__: ClassVar[frozenset[str]] + if sys.version_info >= (3, 15): + # PEP 728 + __closed__: ClassVar[bool | None] + __extra_items__: ClassVar[Any] # AnnotationForm def copy(self) -> typing_extensions.Self: ... # Using Never so that only calls using mypy plugin hook that specialize the signature