-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Implement PEP 649 and PEP 749 #119180
Copy link
Copy link
Closed
Labels
3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-featureA feature request or enhancementA feature request or enhancement
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-featureA feature request or enhancementA feature request or enhancement
PEP-649 has been accepted and should be implemented in Python 3.14. Let's use this issue to track the implementation:
__annotate__attributes gh-119180: PEP 649: Add __annotate__ attributes #119209formatargument toinspect.get_annotationsgh-119180: Addannotationlibmodule to support PEP 649 #119891inspect.AnnotationsFormatshould be a "global enum". Is that desirable? TBD. https://github.com/python/cpython/pull/119361/files#r1614753031)from __future__ import annotations; an introduction to annotationlib; an update to Larry's annotations HOWTOannotationlibmodule to support PEP 649 #119891inspect. (If it can't be removed, get rid of the awkward dance we do fortyping.Protocolto importinspect.getattr_staticlazily.)annotationlibmodule to support PEP 649 #119891annotationlibmodule to support PEP 649 #119891 (comment)annotationlibmodule to support PEP 649 #119891, PEP 649:functools.update_wrapperimplementation #124342pep649-typevarbranch in my fork)__dict____dict__access (Support Python 3.13 quora/pyanalyze#773)__annotate__#124157Things to revisit:
__annotate__parameter__annotations__invalidate__annotate__?I am planning to work on the interpreter core first.
cc @larryhastings @carljm @samuelcolvin
Linked PRs
annotationlibmodule to support PEP 649 #119891__annotations__in__main__#124634annotationlib.Format#131755annotationlib.get_annotations()#135644annotationlib.get_annotations()(GH-135644) #135654annotationlib.get_annotations()intyping.get_type_hints()documentation #137247annotationlib.get_annotations()intyping.get_type_hints()documentation (GH-137247) #137263formatparameter intyping.get_type_hints()#143758