bpo-32684: Fix gather to propagate cancel of itself with return_exceptions by 1st1 · Pull Request #7209 · python/cpython
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://bugs.python.org/issue26923 and, specifically, Task.cancel(): if the task is done/cancelled, we don't raise CancelledError. Similarly for gather(), if all of its tasks are already done, we don't raise it.
This seems to be a super rare edge case.