Change by Devin Fee :
--
versions: +Python 3.6
___
Python tracker
<https://bugs.python.org/issue34730>
___
___
Python-bugs-list mailing list
Unsubscribe:
Devin Fee added the comment:
I've worked around this problem by doing something like this:
async def close_cancelling(agen):
while True:
try:
task = asyncio.ensure_future(agen.__anext__())
await task
yield task.result()
e
New submission from Devin Fee :
I expected an async-generator's aclose() method to cancel it's __anext__().
Instead, the task isn't cancelled, and (it seems) manually cleanup is necessary.
@pytest.mark.asyncio
async def test_aclose_cancels():
done = False
event