Mikhail Efimov
Mikhail Efimov
In this variant I have crash even with proposed fix: ``` import gc def x(): class BaseNode: next = None class Node(BaseNode): def __init__(self) -> None: if BaseNode.next is None:...
Code changes and test look good to me. But IMO, it's better to provide some news entry with `blurb` tool, since it slightly changes code behavior. And I'd suggest to...
LGTM. But it's better to add test for `_setroot` with `ElementLike`, IMO.
Thanks for the PR, @abstractedfox !
Thank you for such a concrete comment! It seems like I made fix by myself after it.
IMHO, additional GET_ITER before FOR_ITER for genexpr is a best way to prevent all such crashes. I will try to provide code changes by myself.
> However, it seems that the GET_ANEXT impression is implemented more robustly and I couldn't find a crash by manipulating the locals of an asyncgen frame. Yes, it seems so....
IMO, this issue should be close because of https://github.com/python/cpython/pull/132351
I've started related d.p.o. thread here: https://discuss.python.org/t/generator-expressions-behavior-with-non-iterable-objects/96329.
For now some test checks doesn't work correctly. I would recommend to make all tests "green" with the local setup, if possible.