Skip to content
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

gh-119180: Lazily wrap annotations on classmethod and staticmethod #119864

Merged
merged 1 commit into from
May 31, 2024

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented May 31, 2024

@JelleZijlstra JelleZijlstra requested review from ambv and carljm May 31, 2024 15:25
@bedevere-app bedevere-app bot mentioned this pull request May 31, 2024
29 tasks
@JelleZijlstra JelleZijlstra marked this pull request as ready for review May 31, 2024 21:04
@JelleZijlstra JelleZijlstra merged commit d28afd3 into python:main May 31, 2024
39 checks passed
@JelleZijlstra JelleZijlstra deleted the pep649-staticclassm branch May 31, 2024 21:05
@AlexWaygood
Copy link
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
Copy link
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
Copy link
Member Author

@AlexWaygood I implemented this in JelleZijlstra@672511a

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
@JelleZijlstra JelleZijlstra restored the pep649-staticclassm branch September 10, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants