[issue39386] getting invalid data from async iterator

2020-01-20 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks for the report. Your example could be boiled down to the following: coro = asynciter() await coro await coro The second call incorrectly returns None but should raise an exception, double awaiting is a programming error. For regular async functions

[issue39386] getting invalid data from async iterator

2020-01-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: +asyncio nosy: +asvetlov, yselivanov ___ Python tracker ___ ___ Python-bugs-list

[issue39386] getting invalid data from async iterator

2020-01-18 Thread John-Mark Gurney
New submission from John-Mark Gurney : If I create a coro from an async iterator, then wait_for it w/ a timeout, but shielded, so it won't get canceled, and then await upon it, it returns invalid data. See the attached test case. The reason I do the following is to make sure that an async it