This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients serhiy.storchaka, yselivanov
Date 2018-03-10.15:56:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Thanks so much for looking into this, Serhiy!

> 2. StopAsyncIteration is dynamically looked up in globals. If set the global StopAsyncIteration or delete it from builtins (for example at the shutdown stage), this will break any "async for".

IIRC I adapted the approach from some other place in compile.c. Quick looking at it reveals that the `assert` statement is compiled in a similar way w.r.t. how AssertionError is looked up at runtime.  You might want to check if there are other places in compile.c that need to be fixed.

> PR 6052 fixes issue 1. I don't know what is the best place for tests. There are two files with tests for "async for": and I'm not sure that new tests use the simplest way for testing this behavior. Could you please look at them Yury?

I think the new tests are fine.
Date User Action Args
2018-03-10 15:56:11yselivanovsetrecipients: + yselivanov, serhiy.storchaka
2018-03-10 15:56:11yselivanovsetmessageid: <>
2018-03-10 15:56:11yselivanovlinkissue33041 messages
2018-03-10 15:56:11yselivanovcreate