From dd80e4d6d7e1b5558db283566c76bbf77ad77d4f Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 17 Mar 2025 19:18:51 +0100 Subject: [PATCH] Add TypedDict.__{readonly,mutable}_keys__ --- stdlib/typing.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/typing.pyi b/stdlib/typing.pyi index 5875b6915762..9b0443973fcd 100644 --- a/stdlib/typing.pyi +++ b/stdlib/typing.pyi @@ -950,6 +950,9 @@ class _TypedDict(Mapping[str, object], metaclass=ABCMeta): # so we only add it to the stub on 3.12+ if sys.version_info >= (3, 12): __orig_bases__: ClassVar[tuple[Any, ...]] + if sys.version_info >= (3, 13): + __readonly_keys__: ClassVar[frozenset[str]] + __mutable_keys__: ClassVar[frozenset[str]] def copy(self) -> typing_extensions.Self: ... # Using Never so that only calls using mypy plugin hook that specialize the signature