bpo-38013: make async_generator_athrow object tolerant to throwing exceptions (GH-16070)

Even when the helper is not started yet.

This behavior follows conventional generator one.
There is no reason for `async_generator_athrow` to handle `gen.throw()` differently.



https://bugs.python.org/issue38013
This commit is contained in:
Andrew Svetlov 2019-09-17 15:59:49 +03:00 committed by Miss Islington (bot)
parent 5f5f11faf9
commit c275312a62
3 changed files with 25 additions and 5 deletions

View file

@ -0,0 +1,3 @@
Allow to call ``async_generator_athrow().throw(...)`` even for non-started
async generator helper. It fixes annoying warning at the end of
:func:`asyncio.run` call.