| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you!
Sorry, something went wrong.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
## Summary This follows up on #25823 now that [python/typeshed#15887](python/typeshed#15887) has been merged and vendored by #25828. This removes the hard-coded synthesis for `TypedDict.__closed__` and `__extra_items__` and reads the declarations from typeshed instead. Python 3.15 uses `_typeshed._type_checker_internals.TypedDictFallback`; earlier versions fall back to `typing_extensions._TypedDict`, preserving the backported attributes and existing behavior.
| Back | FazBrowse Home | New Git URL |
Summary
Python 3.15's PEP 728 implementation adds __closed__ and __extra_items__ to classes created by TypedDict.
This adds those version-gated class variables to _typeshed._type_checker_internals.TypedDictFallback and the obsolete typing._TypedDict compatibility copy.
This was found while implementing PEP 728 support in ty: astral-sh/ruff#25591 (comment)