From fc45ae5f696e81078f3e3ba10cdd8d5018ac079d Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Fri, 26 Jun 2026 12:24:00 +0100 Subject: [PATCH] Add comment explaining why `typing_extensions.TypedDict` is kept distinct it would be too easy for an eager contributor to revert https://github.com/python/typeshed/commit/45313743b0c7fea31ffc389e402c87aaec13291f in the name of simplifying the stub --- stdlib/typing_extensions.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/typing_extensions.pyi b/stdlib/typing_extensions.pyi index 0f6e19cb9f6a..b494f9b36f39 100644 --- a/stdlib/typing_extensions.pyi +++ b/stdlib/typing_extensions.pyi @@ -232,6 +232,9 @@ Literal: _SpecialForm def IntVar(name: str) -> Any: ... # returns a new TypeVar +# Kept as a distinct symbol to `typing.TypedDict` so that type checkers can more easily +# distinguish between the two on Python 3.14, on which `typing_extensions.TypedDict` +# exposes `__closed__` and `__extra_items__` but `typing.TypedDict` does not TypedDict: _SpecialForm # Internal mypy fallback type for all typed dicts (does not exist at runtime)