gh-119180: Lazily wrap annotations on classmethod and staticmethod by JelleZijlstra · Pull Request #119864 · python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Merged
Conversation
Member
JelleZijlstra
requested review from
ambv and
carljm
bedevere-app
Bot
mentioned this pull request
30 tasks
carljm
approved these changes
bedevere-app
Bot
added
the
awaiting merge
label
JelleZijlstra
marked this pull request as ready for review
bedevere-app
Bot
added
awaiting core review
and removed
awaiting merge
labels
JelleZijlstra
merged commit
d28afd3
into
python:main
bedevere-app
Bot
removed
the
awaiting core review
label
JelleZijlstra
deleted the
pep649-staticclassm
branch
AlexWaygood
commented
May 31, 2024
AlexWaygood commented
Member
Hmm, what's the plan for functools.update_wrapper? Some kind of pure-Python version of this descriptor, that lazily queries the original __annotations__?
JelleZijlstra
commented
May 31, 2024
JelleZijlstra commented
Member Author
If the wrapper is a Python function, we can just copy over __annotate__, and the __annotations__ descriptor will know to call the __annotate__. If the wrapper is not a Python function, I'm not sure yet.
JelleZijlstra
commented
Jun 1, 2024
JelleZijlstra commented
Member Author
@AlexWaygood I implemented this in JelleZijlstra@672511a
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request
estyxx pushed a commit to estyxx/cpython that referenced this pull request
JelleZijlstra
restored the
pep649-staticclassm
branch
AA-Turner
mentioned this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment