[issue37455] asyncio.run() error related to finalizing async generators

2019-09-12 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") ___

[issue37455] asyncio.run() error related to finalizing async generators

2019-09-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Yes, please close as a duplicate. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue37455] asyncio.run() error related to finalizing async generators

2019-09-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I think this would be fixed by issue38013. Andrew I feel these are the same issues here and can be closed. -- nosy: +xtreak ___ Python tracker ___

[issue37455] asyncio.run() error related to finalizing async generators

2019-06-30 Thread Sam Frances
Sam Frances added the comment: One final note: changing the `main()` function from the example to add a zero-sleep seems to fix it, but this seems like a rather ad-hoc solution. ``` async def main(): async for i in double(count()): if i > 10: break print(i)

[issue37455] asyncio.run() error related to finalizing async generators

2019-06-30 Thread Sam Frances
Sam Frances added the comment: Apologies for the stray unused function in the example. It should have read: ``` import asyncio async def count(): try: i = 0 while True: yield i i += 1 finally: print("count() cleanup") async def double

[issue37455] asyncio.run() error related to finalizing async generators

2019-06-30 Thread Sam Frances
New submission from Sam Frances : The documentation for `asyncio.run()` states: "This function runs the passed coroutine, taking care of managing the asyncio event loop and finalizing asynchronous generators." However, the following example seems to indicate that async generators are not bei