[issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes

Yury Selivanov report at bugs.python.org
Sun Sep 22 14:43:29 EDT 2019


Yury Selivanov <yselivanov at gmail.com> added the comment:

> The obvious fix would be to modify the 'except StopIteration' branch to handle this case by calling super().cancel() instead of super().set_exception(...).

Yeah, I think this is the solution we should do in 3.8.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38248>
_______________________________________


More information about the Python-bugs-list mailing list