-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Implement PEP 649 and PEP 749 #119180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
3.14
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
stdlib
Python modules in the Lib dir
topic-typing
type-feature
A feature request or enhancement
Comments
JelleZijlstra
added a commit
to JelleZijlstra/cpython
that referenced
this issue
May 21, 2024
The PEP 649 implementation will require a way to load NotImplementedError from the bytecode. @markshannon suggested implementing this by converting LOAD_ASSERTION_ERROR into a more general mechanism for loading constants. This PR adds this new opcode. I will work on the rest of the implementation of the PEP separately.
This was referenced May 21, 2024
JelleZijlstra
added a commit
that referenced
this issue
May 22, 2024
The PEP 649 implementation will require a way to load NotImplementedError from the bytecode. @markshannon suggested implementing this by converting LOAD_ASSERTION_ERROR into a more general mechanism for loading constants. This PR adds this new opcode. I will work on the rest of the implementation of the PEP separately. Co-authored-by: Irit Katriel <[email protected]>
ambv
pushed a commit
that referenced
this issue
May 22, 2024
JelleZijlstra
added a commit
to JelleZijlstra/cpython
that referenced
this issue
May 22, 2024
but did not actually apply the new magic number.
JelleZijlstra
added a commit
that referenced
this issue
May 25, 2024
JelleZijlstra
added a commit
to JelleZijlstra/cpython
that referenced
this issue
May 31, 2024
JelleZijlstra
added a commit
that referenced
this issue
May 31, 2024
JelleZijlstra
added a commit
that referenced
this issue
Jun 11, 2024
JelleZijlstra
added a commit
to JelleZijlstra/cpython
that referenced
this issue
Jun 19, 2024
JelleZijlstra
added a commit
to JelleZijlstra/cpython
that referenced
this issue
Jun 21, 2024
mrahtz
pushed a commit
to mrahtz/cpython
that referenced
this issue
Jun 30, 2024
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this issue
Jul 11, 2024
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this issue
Jul 11, 2024
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
The PEP 649 implementation will require a way to load NotImplementedError from the bytecode. @markshannon suggested implementing this by converting LOAD_ASSERTION_ERROR into a more general mechanism for loading constants. This PR adds this new opcode. I will work on the rest of the implementation of the PEP separately. Co-authored-by: Irit Katriel <[email protected]>
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
PR python#119321 added a comment about the magic number bump but did not actually apply the new magic number.
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
JelleZijlstra
pushed a commit
that referenced
this issue
Mar 28, 2025
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 1, 2025
seehwan
pushed a commit
to seehwan/cpython
that referenced
this issue
Apr 16, 2025
JelleZijlstra
added a commit
to JelleZijlstra/cpython
that referenced
this issue
May 4, 2025
JelleZijlstra
added a commit
that referenced
this issue
May 5, 2025
PEP 749 has been accepted and the implementation on main is done as far as I'm concerned, though I'm sure we'll discover more things to tweak. We need to add more docs; I'll hopefully work on that soon. |
JelleZijlstra
added a commit
to JelleZijlstra/cpython
that referenced
this issue
May 7, 2025
The SC asked that the Appendix in PEP-749 be added to the docs.
JelleZijlstra
added a commit
to JelleZijlstra/cpython
that referenced
this issue
May 10, 2025
JelleZijlstra
added a commit
that referenced
this issue
May 11, 2025
The SC asked that the Appendix in PEP-749 be added to the docs. Co-authored-by: Adam Turner <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 11, 2025
The SC asked that the Appendix in PEP-749 be added to the docs. (cherry picked from commit 3396df5) Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Adam Turner <[email protected]>
JelleZijlstra
added a commit
that referenced
this issue
May 11, 2025
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 11, 2025
…ythonGH-133841) (cherry picked from commit 0eb448c) Co-authored-by: Jelle Zijlstra <[email protected]> pythongh-119180: Fix values of Format members in docs
JelleZijlstra
added a commit
that referenced
this issue
May 11, 2025
…3902) gh-119180: More documentation for PEP 649/749 (GH-133552) The SC asked that the Appendix in PEP-749 be added to the docs. (cherry picked from commit 3396df5) Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Adam Turner <[email protected]>
JelleZijlstra
added a commit
that referenced
this issue
May 11, 2025
…GH-133841) (#133903) gh-119180: annotationlib: Fix values of Format members in docs (GH-133841) (cherry picked from commit 0eb448c) Co-authored-by: Jelle Zijlstra <[email protected]>
JelleZijlstra
added a commit
to JelleZijlstra/cpython
that referenced
this issue
May 24, 2025
- Mention (again) that `type.__annotations__` is unsafe. It is now safe when using only classes defined under PEP 649 semantics, but not with classes defined using `from __future__ import annotations`. - Mention that annotations on instances no longer work. There was already an issue about this. - Mention the general changes in the "Porting to Python 3.14" section. - `annotationlib` was proposed by PEP-749, not PEP-649.
JelleZijlstra
added a commit
that referenced
this issue
May 26, 2025
- Mention (again) that `type.__annotations__` is unsafe. It is now safe when using only classes defined under PEP 649 semantics, but not with classes defined using `from __future__ import annotations`. - Mention that annotations on instances no longer work. There was already an issue about this. - Mention the general changes in the "Porting to Python 3.14" section. - `annotationlib` was proposed by PEP-749, not PEP-649. Co-authored-by: Emma Smith <[email protected]> Co-authored-by: Carol Willing <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 26, 2025
- Mention (again) that `type.__annotations__` is unsafe. It is now safe when using only classes defined under PEP 649 semantics, but not with classes defined using `from __future__ import annotations`. - Mention that annotations on instances no longer work. There was already an issue about this. - Mention the general changes in the "Porting to Python 3.14" section. - `annotationlib` was proposed by PEP-749, not PEP-649. (cherry picked from commit 7291eab) Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Emma Smith <[email protected]> Co-authored-by: Carol Willing <[email protected]>
JelleZijlstra
added a commit
that referenced
this issue
May 26, 2025
gh-119180: Updates to PEP 649/749 docs (GH-134640) - Mention (again) that `type.__annotations__` is unsafe. It is now safe when using only classes defined under PEP 649 semantics, but not with classes defined using `from __future__ import annotations`. - Mention that annotations on instances no longer work. There was already an issue about this. - Mention the general changes in the "Porting to Python 3.14" section. - `annotationlib` was proposed by PEP-749, not PEP-649. (cherry picked from commit 7291eab) Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Emma Smith <[email protected]> Co-authored-by: Carol Willing <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.14
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
stdlib
Python modules in the Lib dir
topic-typing
type-feature
A feature request or enhancement
Uh oh!
There was an error while loading. Please reload this page.
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 #119209format
argument toinspect.get_annotations
gh-119180: Addannotationlib
module to support PEP 649 #119891inspect.AnnotationsFormat
should 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 HOWTOannotationlib
module to support PEP 649 #119891inspect
. (If it can't be removed, get rid of the awkward dance we do fortyping.Protocol
to importinspect.getattr_static
lazily.)annotationlib
module to support PEP 649 #119891annotationlib
module to support PEP 649 #119891 (comment)annotationlib
module to support PEP 649 #119891, PEP 649:functools.update_wrapper
implementation #124342pep649-typevar
branch 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
annotationlib
module to support PEP 649 #119891__annotations__
in__main__
#124634annotationlib.Format
#131755The text was updated successfully, but these errors were encountered: