]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-37658: Fix asyncio.wait_for() to respect waited task status (#21894)
authorElvis Pranskevichus <elvis@magic.io>
Wed, 26 Aug 2020 16:42:45 +0000 (09:42 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Aug 2020 16:42:45 +0000 (09:42 -0700)
commita2118a14627256197bddcf4fcecad4c264c1e39d
tree038b42295921bd86908f322143586e4d083d7cfd
parentc517fc712105c8e5930cb42baaebdbe37fc3e15f
bpo-37658: Fix asyncio.wait_for() to respect waited task status (#21894)

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.
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]