[issue33413] asyncio.gather should not use special Future
Martin Teichmann
report at bugs.python.org
Thu May 10 13:28:43 EDT 2018
Martin Teichmann <martin.teichmann at gmail.com> added the comment:
I looked a bit into the details, and found that bpo-30048 created the described weird behavior. There they fixed the problem that a cancel is ignored if a coroutine manages to cancel its own task and return immediately. As shown in the discussion there, this is actually something happening in real code, and is a valid use case.
They fixed that by setting a CancelledError as an exception raised by the task, but did not cancel that task (they could have, I tested it, it would pass all tests).
But this is just a side show of the fact that we have now four different beasts that can be awaited, and behave differently: coroutines, Futures, Tasks, and _GatheringFutures. I think we should consolidate that.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33413>
_______________________________________
More information about the Python-bugs-list
mailing list