René's URL Explorer Experiment


Title: assigning to __annotations__ has no effect in 3.14.0b1 under from __future__ import annotations · Issue #133778 · python/cpython · GitHub

Open Graph Title: assigning to __annotations__ has no effect in 3.14.0b1 under from __future__ import annotations · Issue #133778 · python/cpython

X Title: assigning to __annotations__ has no effect in 3.14.0b1 under from __future__ import annotations · Issue #133778 · python/cpython

Description: Bug report Bug description: from __future__ import annotations import annotationlib class A: a: int A.__annotations__ = {"a": str} print(A.__annotations__) print(annotationlib.get_annotations(A)) this works in 3.14.0a7, has no effect in ...

Open Graph Description: Bug report Bug description: from __future__ import annotations import annotationlib class A: a: int A.__annotations__ = {"a": str} print(A.__annotations__) print(annotationlib.get_annotations(A)) t...

X Description: Bug report Bug description: from __future__ import annotations import annotationlib class A: a: int A.__annotations__ = {"a": str} print(A.__annotations__) print(annotationlib.get_annotat...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"assigning to __annotations__ has no effect in 3.14.0b1 under from __future__ import annotations","articleBody":"# Bug report\n\n### Bug description:\n\n```python\nfrom __future__ import annotations\nimport annotationlib\n\nclass A:\n    a: int\n\nA.__annotations__ = {\"a\": str}\n\n\nprint(A.__annotations__)\nprint(annotationlib.get_annotations(A))\n\n```\n\nthis works in 3.14.0a7, has no effect in 3.14.0b1.  there seems to be a new attribute `__annotations_cache__` that the assignment goes into but it isn't returned from `__annotations__`:\n\n```\n# 3.14.0a7\n$ ~/.venv314a7/bin/python test4.py \n{'a': \u003cclass 'str'>}\n{'a': \u003cclass 'str'>}\n\n# 3.14.0b1\n$ ~/.venv314/bin/python test4.py \n{'a': 'int'}\n{'a': 'int'}\n```\n\nIf there's a way to get annotationlib.get_annotations() to pick up the change I can use that as a workaround\n\ncc @JelleZijlstra \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-133794\n* gh-134655\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/zzzeek","@type":"Person","name":"zzzeek"},"datePublished":"2025-05-09T16:32:53Z","url":"https://github.com/python/cpython/issues/133778"}

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:51f10ba5-678c-5869-f915-7ed37a1dd48d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC504:1B0A31:26EBF15:350E694:6B0042B9
html-safe-noncea718bb99b6ac3599246f80b1f61af2fafd1c8a627d7c242a564b5ffdc0ca0da3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTA0OjFCMEEzMToyNkVCRjE1OjM1MEU2OTQ6NkIwMDQyQjkiLCJ2aXNpdG9yX2lkIjoiNDg3NTA1NDMyNTM0NjM1Mzg0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace6bf6a9d93af496ba981913c6378bcb3ac4103cde2440eb54d8c616e29b50912
hovercard-subject-tagissue:3052654958
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/133778/issue_layout
twitter:imagehttps://opengraph.githubassets.com/939dc9baf72c6c2f177ed6ba230e86393558c20c9738d3edc516e0e287ed5355/python/cpython/issues/133778
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/939dc9baf72c6c2f177ed6ba230e86393558c20c9738d3edc516e0e287ed5355/python/cpython/issues/133778
og:image:altBug report Bug description: from __future__ import annotations import annotationlib class A: a: int A.__annotations__ = {"a": str} print(A.__annotations__) print(annotationlib.get_annotations(A)) t...
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/133778#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F133778
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%2F133778
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/133778
Reloadhttps://github.com/python/cpython/issues/133778
Reloadhttps://github.com/python/cpython/issues/133778
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/133778
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/133778
assigning to __annotations__ has no effect in 3.14.0b1 under from __future__ import annotationshttps://github.com/python/cpython/issues/133778#top
https://github.com/JelleZijlstra
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 9, 2025https://github.com/python/cpython/issues/133778#issue-3052654958
@JelleZijlstrahttps://github.com/JelleZijlstra
gh-133778: Fix setting __annotations__ under PEP 563 #133794https://github.com/python/cpython/pull/133794
[3.14] gh-133778: Fix setting __annotations__ under PEP 563 (GH-133794) #134655https://github.com/python/cpython/pull/134655
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 9, 2025https://github.com/python/cpython/issues/133778#event-17593928046
JelleZijlstrahttps://github.com/JelleZijlstra
on May 9, 2025https://github.com/python/cpython/issues/133778#event-17593938683
https://github.com/zzzeek
zzzeekhttps://github.com/zzzeek
on May 9, 2025https://github.com/python/cpython/issues/133778#issuecomment-2867187178
JelleZijlstrahttps://github.com/JelleZijlstra
on May 9, 2025https://github.com/python/cpython/issues/133778#event-17593998395
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 9, 2025https://github.com/python/cpython/issues/133778#issuecomment-2867198731
https://github.com/zzzeek
zzzeekhttps://github.com/zzzeek
on May 9, 2025https://github.com/python/cpython/issues/133778#issuecomment-2867296152
picnixzhttps://github.com/picnixz
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
topic-typinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-typing%22
on May 9, 2025https://github.com/python/cpython/issues/133778#event-17594223843
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 9, 2025https://github.com/python/cpython/issues/133778#issuecomment-2867299124
https://github.com/zzzeek
zzzeekhttps://github.com/zzzeek
on May 9, 2025https://github.com/python/cpython/issues/133778#issuecomment-2867308553
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 10, 2025https://github.com/python/cpython/issues/133778#issuecomment-2868174485
@carljmhttps://github.com/carljm
@larryhastingshttps://github.com/larryhastings
https://peps.python.org/pep-0749/#annotations-and-metaclasseshttps://peps.python.org/pep-0749/#annotations-and-metaclasses
JelleZijlstrahttps://github.com/JelleZijlstra
on May 10, 2025https://github.com/python/cpython/issues/133778#event-17598987522
pythongh-133778: Fix setting `__annotations__` under PEP 563https://github.com/JelleZijlstra/cpython/commit/9081715ff82f7fefa6e4d56f195a9fd32516c79f
pythongh-133778https://github.com/python/cpython/issues/133778
9081715https://github.com/JelleZijlstra/cpython/commit/9081715ff82f7fefa6e4d56f195a9fd32516c79f
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 11, 2025https://github.com/python/cpython/issues/133778#issuecomment-2870279954
#133795https://github.com/python/cpython/pull/133795
#133794https://github.com/python/cpython/pull/133794
#133772https://github.com/python/cpython/pull/133772
https://github.com/zzzeek
zzzeekhttps://github.com/zzzeek
on May 12, 2025https://github.com/python/cpython/issues/133778#issuecomment-2872266901
https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/5858https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/5858
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 12, 2025https://github.com/python/cpython/issues/133778#issuecomment-2873134425
https://github.com/zzzeek
zzzeekhttps://github.com/zzzeek
on May 12, 2025https://github.com/python/cpython/issues/133778#issuecomment-2873192949
JelleZijlstrahttps://github.com/JelleZijlstra
on May 25, 2025https://github.com/python/cpython/issues/133778#event-17804722381
gh-133778: Fix setting `__annotations__` under PEP 563 (#133794)https://github.com/python/cpython/commit/4443110c3409ecba9f0fd49495d039030cb7ed58
gh-133778https://github.com/python/cpython/issues/133778
#133794https://github.com/python/cpython/pull/133794
4443110https://github.com/python/cpython/commit/4443110c3409ecba9f0fd49495d039030cb7ed58
miss-islingtonhttps://github.com/miss-islington
on May 25, 2025https://github.com/python/cpython/issues/133778#event-17804722851
pythongh-133778: Fix setting `__annotations__` under PEP 563 (pythonG…https://github.com/miss-islington/cpython/commit/fd18e0aad358da93b850eb2a33e971263c704b12
pythongh-133778https://github.com/python/cpython/issues/133778
pythonG…https://github.com/python/cpython/pull/133794
fd18e0ahttps://github.com/miss-islington/cpython/commit/fd18e0aad358da93b850eb2a33e971263c704b12
JelleZijlstrahttps://github.com/JelleZijlstra
on May 25, 2025https://github.com/python/cpython/issues/133778#event-17804795333
[3.14] gh-133778: Fix setting `__annotations__` under PEP 563 (GH-133794https://github.com/python/cpython/commit/d82d445b18c24ca6b6afdb957a72636eab88efad
gh-133778https://github.com/python/cpython/issues/133778
GH-133794https://github.com/python/cpython/pull/133794
d82d445https://github.com/python/cpython/commit/d82d445b18c24ca6b6afdb957a72636eab88efad
JelleZijlstrahttps://github.com/JelleZijlstra
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 25, 2025https://github.com/python/cpython/issues/133778#event-17804988298
Pranjal095https://github.com/Pranjal095
on Jul 12, 2025https://github.com/python/cpython/issues/133778#event-18600175900
pythongh-133778: Fix setting `__annotations__` under PEP 563 (python#…https://github.com/Pranjal095/cpython/commit/dc2df5d873a943fc790f304e0d3042c3882273ef
pythongh-133778https://github.com/python/cpython/issues/133778
python#…https://github.com/python/cpython/pull/133794
dc2df5dhttps://github.com/Pranjal095/cpython/commit/dc2df5d873a943fc790f304e0d3042c3882273ef
taegyunkimhttps://github.com/taegyunkim
on Aug 4, 2025https://github.com/python/cpython/issues/133778#event-18976826070
pythongh-133778: Fix setting `__annotations__` under PEP 563 (python#…https://github.com/taegyunkim/cpython/commit/93485786f28887bf851ec5d479f63f33751bcffa
pythongh-133778https://github.com/python/cpython/issues/133778
python#…https://github.com/python/cpython/pull/133794
9348578https://github.com/taegyunkim/cpython/commit/93485786f28887bf851ec5d479f63f33751bcffa
gostak-ddhttps://github.com/gostak-dd
on Jun 2, 2026https://github.com/python/cpython/issues/133778#event-26248245662
pythongh-133778: Fix setting `__annotations__` under PEP 563 (python#…https://github.com/gostak-dd/cpython/commit/6c22e139f85443e29b680118cc39334d09ccaa7e
pythongh-133778https://github.com/python/cpython/issues/133778
python#…https://github.com/python/cpython/pull/133794
6c22e13https://github.com/gostak-dd/cpython/commit/6c22e139f85443e29b680118cc39334d09ccaa7e
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/133778
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/133778
JelleZijlstrahttps://github.com/JelleZijlstra
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.