-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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-130881: Handle conditionally defined annotations #130935
Conversation
JelleZijlstra
commented
Mar 7, 2025
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: conditional blocks in class definitions seem to be evaluating types even when these conditionals are false #130881
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I won't force you to follow PEP-7 as the file has a mix of everything which makes it very hard to choose a convention. You can also ignore my suggestion in symtable.c
if you think it's not necessary and if the surrounding code is using the same writing style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I reviewed the changes, though I'm not entirely sure about the tests themselves so another eye is welcome
Once this is merged, should the text in PEP 649 be updated to reflect this change?
|
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some comments/questions for the tests, otherwise looks good :)
I don't own PEP 649 so I can't update it. Could add it to PEP 749 but I already submitted it to the SC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good to me :)
Larry is the owner. @larryhastings should the PEP be updated? |
Accepted PEPs are historical documents; as a rule I'm averse to changing them after they're accepted. PEP 749 is the perfect place to document this change to what's specified in 649. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two nits I missed but otherwise, looks good to me
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>