Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.1k
gh-130881: Handle conditionally defined annotations#130935
gh-130881: Handle conditionally defined annotations#130935JelleZijlstra merged 11 commits intopython:mainfrom
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
JelleZijlstra commentedMar 11, 2025
picnixz left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 followPEP-7 as the file has a mix of everything which makes it very hard to choose a convention. You can also ignore my suggestion insymtable.c if you think it's not necessary and if the surrounding code is using the same writing style.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
picnixz left a comment
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
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
tomasr8 commentedMar 14, 2025
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>
tomasr8 left a comment
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 :)
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
JelleZijlstra commentedMar 16, 2025
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. |
tomasr8 left a comment
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 :)
tomasr8 commentedMar 16, 2025
Larry is the owner.@larryhastings should the PEP be updated? |
larryhastings commentedMar 21, 2025
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. |
picnixz left a comment
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
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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>
898e6b3 intopython:mainUh oh!
There was an error while loading.Please reload this page.
On Python 3.14, this module attribute seems to exist in certainsituations:```pycon>>> if True:... a: str... >>> __conditional_annotations__{0}```It's a pretty esoteric attribute without any documentation. It seems tohave been added inpython/cpython#130935Either way, stubtest was complaining about it in scipy-stubs. So allthings considered, I figured it'd be best to just ignore it.
Uh oh!
There was an error while loading.Please reload this page.