| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Please restore also old tests. I think this change should be made in main. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
Then we need to rollback more changes in main. __iter__ should be called when the generator object is created. |
Sorry, something went wrong.
There was a problem hiding this comment.
I'm not exactly sure about changes in codegen.c, but everything else LGTM.
Sorry, something went wrong.
|
Thanks @markshannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
|
Sorry, @markshannon, I could not cleanly backport this to 3.13 due to a conflict. cherry_picker a5274cd2158a0c7eaa6f54b4e74f8b4e92195e5e 3.13 |
Sorry, something went wrong.
|
GH-135293 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
…ack to avoid bytecode changes in 3.13.
| @@ -204,6 +204,7 @@ def bug1333982(x=[]): | |||
| LOAD_CONST 1 (<code object <genexpr> at 0x..., file "%s", line %d>) | |||
| MAKE_FUNCTION | |||
| LOAD_FAST_BORROW 0 (x) | |||
| Back | FazBrowse Home | New Git URL |
This PR adds a NULL check for tp_iternext to FOR_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 ensuring GET_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