René's URL Explorer Experiment


Title: multi-level hierarchies of TypedDict no longer return superclass elements in __annotations__ as of 3.14.0b1 when future annotations enabled · Issue #133701 · python/cpython · GitHub

Open Graph Title: multi-level hierarchies of TypedDict no longer return superclass elements in __annotations__ as of 3.14.0b1 when future annotations enabled · Issue #133701 · python/cpython

X Title: multi-level hierarchies of TypedDict no longer return superclass elements in __annotations__ as of 3.14.0b1 when future annotations enabled · Issue #133701 · python/cpython

Description: Bug report Bug description: using get_annotations() or accessing __annotations__ directly on a TypedDict subclass previously returned a dictionary of all attributes in the TypedDict hierarchy, now only returns for the sub-most class. onl...

Open Graph Description: Bug report Bug description: using get_annotations() or accessing __annotations__ directly on a TypedDict subclass previously returned a dictionary of all attributes in the TypedDict hierarchy, now ...

X Description: Bug report Bug description: using get_annotations() or accessing __annotations__ directly on a TypedDict subclass previously returned a dictionary of all attributes in the TypedDict hierarchy, now ...

Opengraph URL: https://github.com/python/cpython/issues/133701

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"multi-level hierarchies of TypedDict no longer return superclass elements in __annotations__ as of 3.14.0b1 when future annotations enabled","articleBody":"# Bug report\n\n### Bug description:\n\nusing `get_annotations()` or accessing `__annotations__` directly on a `TypedDict` subclass previously returned a dictionary of all attributes in the TypedDict hierarchy, now only returns for the sub-most class.  only happens when `from __future__ import annotations` is used; when not used, then it works as previously.  there's no workaround here because the typeddict subclass does not include declared superclasses in its `__mro__`.    \n\n```python\nfrom __future__ import annotations\n\nfrom typing import TypedDict\n\nimport annotationlib\n\nclass Base(TypedDict,total=False):\n    a: int\n    b: int\n\nclass Sub(Base,total=False):\n    c: float\n    d: int\n\n# for both, py3.14.0a7 has all four, py3.14.0b1 has only c, d\n# py3.14.0a7: {'a': ForwardRef('int', module='__main__'), 'b': ForwardRef('int', module='__main__'), 'c': ForwardRef('float', module='__main__'), 'd': ForwardRef('int', module='__main__')}\n# py3.14.0b1: {'c': 'float', 'd': 'int'}\n\nprint(Sub.__annotations__)\nprint(annotationlib.get_annotations(Sub))\n\n# there's no way to traverse the ``__mro__`` of the Sub class to find\n# these annotations since Base is not there; prints\n# (\u003cclass '__main__.Sub'>, \u003cclass 'dict'>, \u003cclass 'object'>)\nprint(Sub.__mro__)\n\n\n```\n\n\n### CPython versions tested on:\n\n3.14\n\n### Operating systems tested on:\n\n_No response_\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-133772\n* gh-134003\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/zzzeek","@type":"Person","name":"zzzeek"},"datePublished":"2025-05-08T19:13:41Z","url":"https://github.com/python/cpython/issues/133701"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:fd558def-c840-0818-1d9e-003600c51a99
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9618:3A13A0:279599C:35C3B6A:6B0042A2
html-safe-noncef1935ab1a6fac158978a07be5020a2297d8a2f78197653de442f7a6efc9231ae
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjE4OjNBMTNBMDoyNzk1OTlDOjM1QzNCNkE6NkIwMDQyQTIiLCJ2aXNpdG9yX2lkIjoiNTMxNjMxNDU0OTQ2MzMwMjgxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacea45b3a6a60f2d1d02d622704d2a0f4846d402034345f48c886ffaf38dfdbcb7
hovercard-subject-tagissue:3049872036
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/cpython/133701/issue_layout
twitter:imagehttps://opengraph.githubassets.com/303cd8740a2237e80e68b845e66c3cb922ae628c3a17d3f4931613836bc078f3/python/cpython/issues/133701
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/303cd8740a2237e80e68b845e66c3cb922ae628c3a17d3f4931613836bc078f3/python/cpython/issues/133701
og:image:altBug report Bug description: using get_annotations() or accessing __annotations__ directly on a TypedDict subclass previously returned a dictionary of all attributes in the TypedDict hierarchy, now ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamezzzeek
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
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
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/133701#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F133701
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F133701
Sign uphttps://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%2Fcpython
Reloadhttps://github.com/python/cpython/issues/133701
Reloadhttps://github.com/python/cpython/issues/133701
Reloadhttps://github.com/python/cpython/issues/133701
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/133701
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/133701
multi-level hierarchies of TypedDict no longer return superclass elements in __annotations__ as of 3.14.0b1 when future annotations enabledhttps://github.com/python/cpython/issues/133701#top
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-typinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-typing%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/zzzeek
zzzeekhttps://github.com/zzzeek
on May 8, 2025https://github.com/python/cpython/issues/133701#issue-3049872036
gh-133701: Fix incorrect __annotations__ on TypedDict defined under PEP 563 #133772https://github.com/python/cpython/pull/133772
[3.14] gh-133701: Fix incorrect __annotations__ on TypedDict defined under PEP 563 (GH-133772) #134003https://github.com/python/cpython/pull/134003
zzzeekhttps://github.com/zzzeek
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on May 8, 2025https://github.com/python/cpython/issues/133701#event-17579275837
picnixzhttps://github.com/picnixz
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-typinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-typing%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
on May 8, 2025https://github.com/python/cpython/issues/133701#event-17580833281
JelleZijlstrahttps://github.com/JelleZijlstra
on May 9, 2025https://github.com/python/cpython/issues/133701#event-17593340977
pythongh-133701: Fix incorrect `__annotations__` on TypedDict defined…https://github.com/JelleZijlstra/cpython/commit/b3c854c8694cf3a2e4607793d323244654d0b803
pythongh-133701https://github.com/python/cpython/issues/133701
b3c854chttps://github.com/JelleZijlstra/cpython/commit/b3c854c8694cf3a2e4607793d323244654d0b803
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 9, 2025https://github.com/python/cpython/issues/133701#issuecomment-2867066906
#133772https://github.com/python/cpython/pull/133772
JelleZijlstrahttps://github.com/JelleZijlstra
on May 14, 2025https://github.com/python/cpython/issues/133701#event-17653714697
gh-133701: Fix incorrect `__annotations__` on TypedDict defined under…https://github.com/python/cpython/commit/9836503b48e047db117b3bef3a812c40ed3e988a
gh-133701https://github.com/python/cpython/issues/133701
9836503https://github.com/python/cpython/commit/9836503b48e047db117b3bef3a812c40ed3e988a
miss-islingtonhttps://github.com/miss-islington
on May 14, 2025https://github.com/python/cpython/issues/133701#event-17653716814
pythongh-133701: Fix incorrect `__annotations__` on TypedDict defined…https://github.com/miss-islington/cpython/commit/f5700534d7bee2a3fd7789c30f7099fa31d9f2ec
pythongh-133701https://github.com/python/cpython/issues/133701
f570053https://github.com/miss-islington/cpython/commit/f5700534d7bee2a3fd7789c30f7099fa31d9f2ec
JelleZijlstrahttps://github.com/JelleZijlstra
on May 14, 2025https://github.com/python/cpython/issues/133701#event-17654351067
[3.14] gh-133701: Fix incorrect `__annotations__` on TypedDict define…https://github.com/python/cpython/commit/d6cb8fa86eb3c6e41e532c247a02c1c3df93e744
gh-133701https://github.com/python/cpython/issues/133701
d6cb8fahttps://github.com/python/cpython/commit/d6cb8fa86eb3c6e41e532c247a02c1c3df93e744
JelleZijlstrahttps://github.com/JelleZijlstra
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 15, 2025https://github.com/python/cpython/issues/133701#event-17662605306
Pranjal095https://github.com/Pranjal095
on Jul 12, 2025https://github.com/python/cpython/issues/133701#event-18600172893
pythongh-133701: Fix incorrect `__annotations__` on TypedDict defined…https://github.com/Pranjal095/cpython/commit/2db067524e9892604bed650576646626e95c6e0c
pythongh-133701https://github.com/python/cpython/issues/133701
2db0675https://github.com/Pranjal095/cpython/commit/2db067524e9892604bed650576646626e95c6e0c
taegyunkimhttps://github.com/taegyunkim
on Aug 4, 2025https://github.com/python/cpython/issues/133701#event-18976815623
pythongh-133701: Fix incorrect `__annotations__` on TypedDict defined…https://github.com/taegyunkim/cpython/commit/497193f998a8fe1065d2631a64893d9479ac5c91
pythongh-133701https://github.com/python/cpython/issues/133701
497193fhttps://github.com/taegyunkim/cpython/commit/497193f998a8fe1065d2631a64893d9479ac5c91
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/133701
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/133701
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-typinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-typing%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
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.