René's URL Explorer Experiment


Title: Discussion: Runtime error when overriding a mutable key with a `ReadOnly` one · Issue #681 · python/typing_extensions · GitHub

Open Graph Title: Discussion: Runtime error when overriding a mutable key with a `ReadOnly` one · Issue #681 · python/typing_extensions

X Title: Discussion: Runtime error when overriding a mutable key with a `ReadOnly` one · Issue #681 · python/typing_extensions

Description: Follow up from here: #606 (comment) Background: Currently CPython emits a TypeError when a mutable key from a base TypedDict is overwritten by a ReadOnly one of a child: https://github.com/python/cpython/blob/805e3368d6d07e58430654d13652...

Open Graph Description: Follow up from here: #606 (comment) Background: Currently CPython emits a TypeError when a mutable key from a base TypedDict is overwritten by a ReadOnly one of a child: https://github.com/python/c...

X Description: Follow up from here: #606 (comment) Background: Currently CPython emits a TypeError when a mutable key from a base TypedDict is overwritten by a ReadOnly one of a child: https://github.com/python/c...

Opengraph URL: https://github.com/python/typing_extensions/issues/681

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Discussion: Runtime error when overriding a mutable key with a `ReadOnly` one","articleBody":"Follow up from here: https://github.com/python/typing_extensions/issues/606#issuecomment-3277382801\n\n\nBackground:\nCurrently CPython emits a TypeError when a mutable key from a base TypedDict is overwritten by a ReadOnly one of a child: https://github.com/python/cpython/blob/805e3368d6d07e58430654d1365283924fdf4143/Lib/typing.py#L3151\n\nand it has an explicit test for that behavior: https://github.com/python/cpython/blob/805e3368d6d07e58430654d1365283924fdf4143/Lib/test/test_typing.py#L9077\n\nHowever typing_extensions permits and tests for that:\n- https://github.com/python/typing_extensions/blob/main/src/typing_extensions.py#L1221\n- https://github.com/python/typing_extensions/blob/main/src/test_typing_extensions.py#L5000\n\nOriginally typing_extensions had the same behaviour as CPython, however that was changed: https://github.com/python/typing_extensions/commit/d6c50f585c386490d38ad6b8ce5543aed6e633a2\n\n\nThis adjustment was not taken into account when the CPython implementation was done: https://github.com/python/cpython/pull/116350\n\nAlthough this point was later raised in the issue (after the merge of the PR): https://github.com/python/cpython/issues/116127#issuecomment-3176307396\n\n\nMy opinion:\nFrom what i understand the TypeError in CPython for this behaviour is pretty unique, as i dont think any other such attribute is runtime enforced.\n\ntyping.Final and typing.ReadOnly even specify \"There is no runtime checking for this property.\" in the [docs](https://docs.python.org/3/library/typing.html#typing.Final). (Although that obviously refers them only being read, but still).\n\nAdditionally the typing docs in general state \"The Python runtime does not enforce function and variable type annotations. They can be used by third party tools such as [type checkers](https://docs.python.org/3/glossary.html#term-static-type-checker), IDEs, linters, etc.\". Lastly, neither the docs nor the PEP say anything about such a type error existing.\n\nSo i definitely feel like the optimal thing here would be to not have a runtime error.\n\nOn top of that i feel like removing a TypeError is probably a less intrusive change than adding one, even though changes in CPython are obviously more impactful than ones in typing_extensions.","author":{"url":"https://github.com/JanEricNitschke","@type":"Person","name":"JanEricNitschke"},"datePublished":"2025-09-13T09:24:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/681/typing_extensions/issues/681"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6047f00a-756e-d2cb-f59e-1fc1da67643d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE7E0:10FD0C:A7F60B:E0521C:6969806D
html-safe-noncec88bdc53927d00ff65eb83d4f37e7f04b72ab137ee8b5b3cc8014b6610a2cadb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0UwOjEwRkQwQzpBN0Y2MEI6RTA1MjFDOjY5Njk4MDZEIiwidmlzaXRvcl9pZCI6IjU1NzAwODY1MTAzNDY3MzE2MjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0e5d726abcf454db788f45cdc97602c3ab1b5986d616216ecbb0af97d9277ad8
hovercard-subject-tagissue:3412981416
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typing_extensions/681/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3b04f3f3e3f8a64c2778c8aeb0c6c16b8f170be11852554b77fdfd3680a6f0a1/python/typing_extensions/issues/681
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3b04f3f3e3f8a64c2778c8aeb0c6c16b8f170be11852554b77fdfd3680a6f0a1/python/typing_extensions/issues/681
og:image:altFollow up from here: #606 (comment) Background: Currently CPython emits a TypeError when a mutable key from a base TypedDict is overwritten by a ReadOnly one of a child: https://github.com/python/c...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJanEricNitschke
hostnamegithub.com
expected-hostnamegithub.com
Nonef33e4b94c8824ab2b434d82a94139432fb5ebee9df4b75304140ad22508c4a77
turbo-cache-controlno-preview
go-importgithub.com/python/typing_extensions git https://github.com/python/typing_extensions.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id494077289
octolytics-dimension-repository_nwopython/typing_extensions
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id494077289
octolytics-dimension-repository_network_root_nwopython/typing_extensions
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release48f380098b30acbb700b04f1724481ca10d574fc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/typing_extensions/issues/681#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping_extensions%2Fissues%2F681
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftyping_extensions%2Fissues%2F681
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Ftyping_extensions
Reloadhttps://github.com/python/typing_extensions/issues/681
Reloadhttps://github.com/python/typing_extensions/issues/681
Reloadhttps://github.com/python/typing_extensions/issues/681
python https://github.com/python
typing_extensionshttps://github.com/python/typing_extensions
Please reload this pagehttps://github.com/python/typing_extensions/issues/681
Notifications https://github.com/login?return_to=%2Fpython%2Ftyping_extensions
Fork 133 https://github.com/login?return_to=%2Fpython%2Ftyping_extensions
Star 544 https://github.com/login?return_to=%2Fpython%2Ftyping_extensions
Code https://github.com/python/typing_extensions
Issues 18 https://github.com/python/typing_extensions/issues
Pull requests 10 https://github.com/python/typing_extensions/pulls
Actions https://github.com/python/typing_extensions/actions
Projects 0 https://github.com/python/typing_extensions/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/typing_extensions/security
Please reload this pagehttps://github.com/python/typing_extensions/issues/681
Insights https://github.com/python/typing_extensions/pulse
Code https://github.com/python/typing_extensions
Issues https://github.com/python/typing_extensions/issues
Pull requests https://github.com/python/typing_extensions/pulls
Actions https://github.com/python/typing_extensions/actions
Projects https://github.com/python/typing_extensions/projects
Security https://github.com/python/typing_extensions/security
Insights https://github.com/python/typing_extensions/pulse
New issuehttps://github.com/login?return_to=https://github.com/python/typing_extensions/issues/681
New issuehttps://github.com/login?return_to=https://github.com/python/typing_extensions/issues/681
Discussion: Runtime error when overriding a mutable key with a ReadOnly onehttps://github.com/python/typing_extensions/issues/681#top
https://github.com/JanEricNitschke
https://github.com/JanEricNitschke
JanEricNitschkehttps://github.com/JanEricNitschke
on Sep 13, 2025https://github.com/python/typing_extensions/issues/681#issue-3412981416
#606 (comment)https://github.com/python/typing_extensions/issues/606#issuecomment-3277382801
https://github.com/python/cpython/blob/805e3368d6d07e58430654d1365283924fdf4143/Lib/typing.py#L3151https://github.com/python/cpython/blob/805e3368d6d07e58430654d1365283924fdf4143/Lib/typing.py#L3151
https://github.com/python/cpython/blob/805e3368d6d07e58430654d1365283924fdf4143/Lib/test/test_typing.py#L9077https://github.com/python/cpython/blob/805e3368d6d07e58430654d1365283924fdf4143/Lib/test/test_typing.py#L9077
https://github.com/python/typing_extensions/blob/main/src/typing_extensions.py#L1221https://github.com/python/typing_extensions/blob/main/src/typing_extensions.py#L1221
https://github.com/python/typing_extensions/blob/main/src/test_typing_extensions.py#L5000https://github.com/python/typing_extensions/blob/main/src/test_typing_extensions.py#L5000
d6c50f5https://github.com/python/typing_extensions/commit/d6c50f585c386490d38ad6b8ce5543aed6e633a2
python/cpython#116350https://github.com/python/cpython/pull/116350
python/cpython#116127 (comment)https://github.com/python/cpython/issues/116127#issuecomment-3176307396
docshttps://docs.python.org/3/library/typing.html#typing.Final
type checkershttps://docs.python.org/3/glossary.html#term-static-type-checker
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.