]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 (GH-21895...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 26 Aug 2020 17:14:59 +0000 (10:14 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Aug 2020 17:14:59 +0000 (19:14 +0200)
commit1036ccb55de4abc70837cb46a72ddbb370b8fc94
tree307a6e80f9467c7ad18242c717c772d5e3fc809f
parentd7cd1164c18dbf78380ce4c95bf46c7bb0ac0bb7
bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 (GH-21895) (GH-21963)

When I was fixing bpo-32751 back in GH-7216 I missed the case when
*timeout* is zero or negative.  This takes care of that.

Props to @aaliddell for noticing the inconsistency.
(cherry picked from commit c517fc712105c8e5930cb42baaebdbe37fc3e15f)

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-50-12.bpo-32751.85je5X.rst [new file with mode: 0644]