René's URL Explorer Experiment


Title: Implement PEP 649 and PEP 749 · Issue #119180 · python/cpython · GitHub

Open Graph Title: Implement PEP 649 and PEP 749 · Issue #119180 · python/cpython

X Title: Implement PEP 649 and PEP 749 · Issue #119180 · python/cpython

Description: PEP-649 has been accepted and should be implemented in Python 3.14. Let's use this issue to track the implementation: Decide on or clarify the adoption strategy (https://discuss.python.org/t/pep-649-deferred-evaluation-of-annotations-ten...

Open Graph Description: PEP-649 has been accepted and should be implemented in Python 3.14. Let's use this issue to track the implementation: Decide on or clarify the adoption strategy (https://discuss.python.org/t/pep-64...

X Description: PEP-649 has been accepted and should be implemented in Python 3.14. Let's use this issue to track the implementation: Decide on or clarify the adoption strategy (https://discuss.python.org/t/pe...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Implement PEP 649 and PEP 749","articleBody":"PEP-649 has been accepted and should be implemented in Python 3.14. Let's use this issue to track the implementation:\n\n- [x] Decide on or clarify the adoption strategy (https://discuss.python.org/t/pep-649-deferred-evaluation-of-annotations-tentatively-accepted/21331/44)\n- [x] Add new `__annotate__` attributes #119209\n- [x] Implement core interpreter changes (e.g., new symbol table functionality) #119361\n- [x] Implement new Python-level APIs, like the new `format` argument to `inspect.get_annotations` #119891\n  - [x] (PEP-649 specifies that `inspect.AnnotationsFormat` should be a \"global enum\". Is that desirable? TBD. https://github.com/python/cpython/pull/119361/files#r1614753031)\n- [x] Document the new semantics #122235 \n  - [ ] Add higher-level documentation, e.g. a migration guide away from `from __future__ import annotations`; an introduction to annotationlib; an update to Larry's annotations HOWTO\n  - [ ] The SC would like https://peps.python.org/pep-0749/#appendix incorporated into the docs\n- [x] Make staticmethod and classmethod not force evaluation of annotations #119864\n- [x] Adapt standard library code that uses annotations to work excellently with PEP 649\n  - [x] dataclasses #119891\n  - [x] typing.py: TypedDict, NamedTuple, try to remove dependency on `inspect`. (If it can't be removed, get rid of the awkward dance we do for `typing.Protocol` to import `inspect.getattr_static` lazily.)\n  - [x] singledispatch #119891\n    - [x] Also make it only evaluate the relevant parameter, https://github.com/python/cpython/pull/119891#discussion_r1636397226\n  - [x] functools.update_wrapper #119891, #124342\n- [x] Add PEP 649-like functionality to TypeAliasType, TypeVar, etc. (`pep649-typevar` branch in my fork)\n- [ ] Make sure the ecosystem is ready by testing third-party libraries like Pydantic\n  - [x] typing_extensions: needs changes similar to those in typing.py (python/typing_extensions#412)\n  - [ ] beartype: had various unrelated problems on 3.13 (beartype/beartype#387); a few additional tests fail on the PR branch due to direct manipulation of `__dict__`\n  - [ ] typeguard: some unrelated 3.13 problems (agronholm/typeguard#460); no test failures related to PEP 649\n  - [ ] pyanalyze: some unrelated 3.13 issues and a few changes necessary due to direct `__dict__` access (quora/pyanalyze#773)\n  - [ ] pydantic: failed to build for 3.14 so far\n- [ ] Optimize the implementation. Ideas:\n  - [ ] Avoid creation of function objects and store only code objects instead #124157\n  - [x] Avoid creation of AST nodes and use of eval() for ForwardRefs that are just names #124337\n\nThings to revisit:\n\n- [x] Should FORWARDREF be the default? https://github.com/beartype/beartype/pull/440#issuecomment-2373086020\n- [x] Add VALUE_WITH_FAKE_GLOBALS format\n- [x] Name of `__annotate__` parameter\n- [x] Should setting `__annotations__` invalidate `__annotate__`?\n- [x] Rename SOURCE to STRING?\n\nI am planning to work on the interpreter core first.\n\ncc @larryhastings @carljm @samuelcolvin \n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-119209\n* gh-119321\n* gh-119361\n* gh-119397\n* gh-119864\n* gh-119891\n* gh-120719\n* gh-120816\n* gh-122074\n* gh-122210\n* gh-122212\n* gh-122235\n* gh-122365\n* gh-122366\n* gh-124326\n* gh-124337\n* gh-124393\n* gh-124415\n* gh-124461\n* gh-124479\n* gh-124561\n* gh-124620\n* gh-124634\n* gh-124730\n* gh-131755\n* gh-133407\n* gh-133552\n* gh-133841\n* gh-133902\n* gh-133903\n* gh-134640\n* gh-134731\n* gh-135644\n* gh-135654\n* gh-137247\n* gh-137263\n* gh-143758\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2024-05-19T15:34:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/119180/cpython/issues/119180"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:710af266-c277-06f9-ea51-ceeaa9f2707e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE542:311995:32AB127:425D75E:696B8CE2
html-safe-nonce5dd2160cd326f0e5e875f79a699f0790be8b7139b6b03004a0aab71428d5aa13
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTQyOjMxMTk5NTozMkFCMTI3OjQyNUQ3NUU6Njk2QjhDRTIiLCJ2aXNpdG9yX2lkIjoiNDg4MzI2Nzc2MzA3ODY2MzM5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca35283be9e220c42eb56aa5148566fa19331e9cfdec6b7a165d569c38b565bfd
hovercard-subject-tagissue:2304664735
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/119180/issue_layout
twitter:imagehttps://opengraph.githubassets.com/86791d93febbf0878e8f6ef4bc99013eab28d69a71a8a4824eeed64de0553df1/python/cpython/issues/119180
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/86791d93febbf0878e8f6ef4bc99013eab28d69a71a8a4824eeed64de0553df1/python/cpython/issues/119180
og:image:altPEP-649 has been accepted and should be implemented in Python 3.14. Let's use this issue to track the implementation: Decide on or clarify the adoption strategy (https://discuss.python.org/t/pep-64...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJelleZijlstra
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
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
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/119180#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F119180
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%2Fcpython%2Fissues%2F119180
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%2Fcpython
Reloadhttps://github.com/python/cpython/issues/119180
Reloadhttps://github.com/python/cpython/issues/119180
Reloadhttps://github.com/python/cpython/issues/119180
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/119180
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/issues/119180
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/119180
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/119180
Implement PEP 649 and PEP 749https://github.com/python/cpython/issues/119180#top
https://github.com/JelleZijlstra
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%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-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
https://github.com/JelleZijlstra
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 19, 2024https://github.com/python/cpython/issues/119180#issue-2304664735
PEP-649https://peps.python.org/649
https://discuss.python.org/t/pep-649-deferred-evaluation-of-annotations-tentatively-accepted/21331/44https://discuss.python.org/t/pep-649-deferred-evaluation-of-annotations-tentatively-accepted/21331/44
gh-119180: PEP 649: Add __annotate__ attributes #119209https://github.com/python/cpython/pull/119209
gh-119180: PEP 649 compiler changes #119361https://github.com/python/cpython/pull/119361
gh-119180: Add annotationlib module to support PEP 649 #119891https://github.com/python/cpython/pull/119891
PEP-649https://peps.python.org/649
https://github.com/python/cpython/pull/119361/files#r1614753031https://github.com/python/cpython/pull/119361/files#r1614753031
gh-119180: Documentation for PEP 649 and 749 #122235https://github.com/python/cpython/pull/122235
https://peps.python.org/pep-0749/#appendixhttps://peps.python.org/pep-0749/#appendix
gh-119180: Lazily wrap annotations on classmethod and staticmethod #119864https://github.com/python/cpython/pull/119864
gh-119180: Add annotationlib module to support PEP 649 #119891https://github.com/python/cpython/pull/119891
gh-119180: Add annotationlib module to support PEP 649 #119891https://github.com/python/cpython/pull/119891
gh-119180: Add annotationlib module to support PEP 649 #119891 (comment)https://github.com/python/cpython/pull/119891#discussion_r1636397226
gh-119180: Add annotationlib module to support PEP 649 #119891https://github.com/python/cpython/pull/119891
PEP 649: functools.update_wrapper implementation #124342https://github.com/python/cpython/issues/124342
Support my PEP 649 branch typing_extensions#412https://github.com/python/typing_extensions/pull/412
[Future] Python 3.13 conformance beartype/beartype#387https://github.com/beartype/beartype/issues/387
Support Python 3.13 agronholm/typeguard#460https://github.com/agronholm/typeguard/pull/460
Support Python 3.13 quora/pyanalyze#773https://github.com/quora/pyanalyze/pull/773
PEP 649: Avoid creation of function objects for __annotate__ #124157https://github.com/python/cpython/issues/124157
gh-119180: Avoid going through AST and eval() when possible in annotationlib #124337https://github.com/python/cpython/pull/124337
Some improvements for Python 3.14 / PEP 649 support beartype/beartype#440 (comment)https://github.com/beartype/beartype/pull/440#issuecomment-2373086020
@larryhastingshttps://github.com/larryhastings
@carljmhttps://github.com/carljm
@samuelcolvinhttps://github.com/samuelcolvin
gh-119180: PEP 649: Add __annotate__ attributes #119209https://github.com/python/cpython/pull/119209
gh-119180: Add LOAD_COMMON_CONSTANT opcode #119321https://github.com/python/cpython/pull/119321
gh-119180: PEP 649 compiler changes #119361https://github.com/python/cpython/pull/119361
gh-119180: Update the magic number #119397https://github.com/python/cpython/pull/119397
gh-119180: Lazily wrap annotations on classmethod and staticmethod #119864https://github.com/python/cpython/pull/119864
gh-119180: Add annotationlib module to support PEP 649 #119891https://github.com/python/cpython/pull/119891
gh-119180: Fix annotations lookup on classes with custom metaclasses #120719https://github.com/python/cpython/pull/120719
gh-119180: Alternative approach to metaclass annotations: never use the dict #120816https://github.com/python/cpython/pull/120816
gh-119180: Use type descriptors to access annotations (PEP 749) #122074https://github.com/python/cpython/pull/122074
gh-119180: Improvements to ForwardRef.evaluate #122210https://github.com/python/cpython/pull/122210
gh-119180: Add evaluate functions for type params and type aliases #122212https://github.com/python/cpython/pull/122212
gh-119180: Documentation for PEP 649 and 749 #122235https://github.com/python/cpython/pull/122235
gh-119180: annotationlib: Fix __all__, other minor fixes #122365https://github.com/python/cpython/pull/122365
gh-119180: Add myself as CODEOWNER for annotationlib #122366https://github.com/python/cpython/pull/122366
gh-119180: Fix annotationlib.ForwardRef.evaluate with no globals #124326https://github.com/python/cpython/pull/124326
gh-119180: Avoid going through AST and eval() when possible in annotationlib #124337https://github.com/python/cpython/pull/124337
gh-119180: Add discussion of annotations to the 3.14 What's New #124393https://github.com/python/cpython/pull/124393
gh-119180: Add VALUE_WITH_FAKE_GLOBALS format to annotationlib #124415https://github.com/python/cpython/pull/124415
gh-119180: Rename parameter to __annotate__ functions #124461https://github.com/python/cpython/pull/124461
gh-119180: Make FORWARDREF format look at __annotations__ first #124479https://github.com/python/cpython/pull/124479
gh-119180: Disallow instantiation of ConstEvaluator objects #124561https://github.com/python/cpython/pull/124561
gh-119180: Rename SOURCE format to STRING #124620https://github.com/python/cpython/pull/124620
gh-119180: No longer set __annotations__ in __main__ #124634https://github.com/python/cpython/pull/124634
gh-119180: Set the name of the param to __annotate__ to "format" #124730https://github.com/python/cpython/pull/124730
gh-119180: Use equality when comparing against annotationlib.Format #131755https://github.com/python/cpython/pull/131755
gh-119180: Make the FORWARDREF format work with more kinds of runtime errors #133407https://github.com/python/cpython/pull/133407
gh-119180: More documentation for PEP 649/749 #133552https://github.com/python/cpython/pull/133552
gh-119180: annotationlib: Fix values of Format members in docs #133841https://github.com/python/cpython/pull/133841
[3.14] gh-119180: More documentation for PEP 649/749 (GH-133552) #133902https://github.com/python/cpython/pull/133902
[3.14] gh-119180: annotationlib: Fix values of Format members in docs (GH-133841) #133903https://github.com/python/cpython/pull/133903
gh-119180: Updates to PEP 649/749 docs #134640https://github.com/python/cpython/pull/134640
[3.14] gh-119180: Updates to PEP 649/749 docs (GH-134640) #134731https://github.com/python/cpython/pull/134731
gh-119180: Only fetch globals and locals if necessary in annotationlib.get_annotations() #135644https://github.com/python/cpython/pull/135644
[3.14] gh-119180: Only fetch globals and locals if necessary in annotationlib.get_annotations() (GH-135644) #135654https://github.com/python/cpython/pull/135654
gh-119180: Refer to annotationlib.get_annotations() in typing.get_type_hints() documentation #137247https://github.com/python/cpython/pull/137247
[3.14] gh-119180: Refer to annotationlib.get_annotations() in typing.get_type_hints() documentation (GH-137247) #137263https://github.com/python/cpython/pull/137263
gh-119180: Document the format parameter in typing.get_type_hints() #143758https://github.com/python/cpython/pull/143758
JelleZijlstrahttps://github.com/JelleZijlstra
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%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-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%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.