]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-37658: Fix asyncio.wait_for() to respect waited task status (GH-21894) (GH-21964)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 26 Aug 2020 17:15:35 +0000 (10:15 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Aug 2020 17:15:35 +0000 (19:15 +0200)
commit9de6be4e2ae605a1deb6fa72d5c5f66b07817e4c
treeef8050da8bc9d6bc04557ea72d04930b97b55a31
parent1036ccb55de4abc70837cb46a72ddbb370b8fc94
bpo-37658: Fix asyncio.wait_for() to respect waited task status (GH-21894) (GH-21964)

Currently, if `asyncio.wait_for()` itself is cancelled it will always
raise `CancelledError` regardless if the underlying task is still
running.  This is similar to a race with the timeout, which is handled
already.
(cherry picked from commit a2118a14627256197bddcf4fcecad4c264c1e39d)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
Lib/asyncio/tasks.py
Lib/test/test_asyncio/test_tasks.py
Misc/NEWS.d/next/Library/2020-08-15-15-21-40.bpo-37658.f9nivB.rst [new file with mode: 0644]