-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
[3.14] GH-135171: Fix generator expressions one last time (hopefully) #135225
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
base: 3.14
Are you sure you want to change the base?
Conversation
Please restore also old tests. I think this change should be made in |
I'll add back the old test. This change can't be made in main due to the the changes to the way that iteration is implemented. |
Then we need to rollback more changes in main. |
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'm not exactly sure about changes in codegen.c, but everything else LGTM.
This PR adds a NULL check for
tp_iternext
toFOR_ITER
to prevent the crash in #125038.It then moves
GET_ITER
back to generation expression creation, thus fixing #135171 and avoids re-introducing #127682 by ensuringGET_ITER
is never added twice.I've chosen to make a new PR rather than reverting earlier ones as I want to keep all the new tests we've added, and it is probably easier to review than multiple reverts.
@hugovk @Yhg1s