You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement PEP 705 (TypedDict: Read-only items) #116127
Don’t you think that a runtime error shouldn’t occur if mutable key overrides a read-only one in a base class? Like in typing_extensions (python/typing_extensions/pull/333) implementation as mentioned here
Maybe it was just missed because it was changed in another commit:
At this point making this an error would be a backwards incompatibility in CPython. In general I prefer to avoid raising runtime errors in the typing implementation; they reduce flexibility for future changes or nonstandard usage of the module.
I think it would be best to open a new issue, with a reproduction, what version of Python you're using, what you see, and what you would expect to see. I don't fully understand what you're describing, unfortunately.
Activity
sobolevn commentedon Mar 1, 2024
Is someone working on this already? :)
Or can I take this over?
JelleZijlstra commentedon Mar 1, 2024
I am not working on it, feel free to take it. Thanks!
sobolevn commentedon Mar 1, 2024
Basically, the implementation exists here: python/typing_extensions@0b0166d
I just need to port it.
pythongh-116127: PEP-705: Add `ReadOnly` support for `TypedDict`
gh-116127: PEP-705: Add `ReadOnly` support for `TypedDict` (#116350)
pythongh-116127: PEP-705: Add `ReadOnly` support for `TypedDict` (pyt…
JelleZijlstra commentedon Apr 10, 2024
@sobolevn any progress here? The beta freeze is approaching.
JelleZijlstra commentedon Apr 10, 2024
Wait, it was done. Thank you!
pythongh-116127: PEP-705: Add `ReadOnly` support for `TypedDict` (pyt…
donbarbos commentedon Aug 11, 2025
Don’t you think that a runtime error shouldn’t occur if mutable key overrides a read-only one in a base class? Like in typing_extensions (python/typing_extensions/pull/333) implementation as mentioned here
Maybe it was just missed because it was changed in another commit:
Actually I noticed this discrepancy while trying to run
test_typing, importingtyping_extensionsinstead oftyping.JelleZijlstra commentedon Aug 12, 2025
At this point making this an error would be a backwards incompatibility in CPython. In general I prefer to avoid raising runtime errors in the typing implementation; they reduce flexibility for future changes or nonstandard usage of the module.
alicederyn commentedon Aug 12, 2025
I think it would be best to open a new issue, with a reproduction, what version of Python you're using, what you see, and what you would expect to see. I don't fully understand what you're describing, unfortunately.