{{ message }}
gh-119180: PEP 649 compiler changes#119361
Merged
JelleZijlstra merged 77 commits intoJun 11, 2024
Merged
Conversation
30 tasks
88 hidden items
Load more…
…s on This makes it so functools.update_wrapper can always copy __annotate__ without having to worry about whether or not the future is enabled.
Member
Author
|
Any further feedback on this PR? Getting this in will make it possible to start working on the Python-level parts of the PEP, which can be done in smaller chunks. |
Sorry, something went wrong.
AlexWaygood
reviewed
Jun 7, 2024
AlexWaygood
left a comment
Member
There was a problem hiding this comment.
The bits I feel qualified to comment on all look good to me!
Sorry, something went wrong.
picnixz
reviewed
Jun 8, 2024
carljm
approved these changes
Jun 10, 2024
mrahtz
pushed a commit
to mrahtz/cpython
that referenced
this pull request
Jun 30, 2024
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this pull request
Jul 11, 2024
estyxx
pushed a commit
to estyxx/cpython
that referenced
this pull request
Jul 17, 2024
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.
This implements the compiler changes in PEP-649, creating a compiler-generated
__annotate__function that holds the function, class, and module annotations.I commented on Discuss on some of the CPython tests I needed to change: https://discuss.python.org/t/pep-649-deferred-evaluation-of-annotations-tentatively-accepted/21331/60
I tried this branch on a few prominent runtime typing projects; my notes are in the issue description (#119180). Mostly there are few issues, except a few places that need adjustment because they were checking for annotations in the
__dict__directly.