]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-37658: Fix asyncio.wait_for() to respect waited task status (GH-21894) (#21965)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 26 Aug 2020 18:26:28 +0000 (11:26 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Aug 2020 18:26:28 +0000 (11:26 -0700)
commit6e1954cd8286e083e7f8d09516d91b6b15769a4e
tree45986fbbbe8f561525ca4bb8728afca7ab9af224
parent08045391a7aa87d4fbd3e8ef4c852c2fa4e81a8a
bpo-37658: Fix asyncio.wait_for() to respect waited task status (GH-21894) (#21965)

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]