]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 (#21895)
authorElvis Pranskevichus <elvis@magic.io>
Wed, 26 Aug 2020 16:42:22 +0000 (09:42 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Aug 2020 16:42:22 +0000 (09:42 -0700)
commitc517fc712105c8e5930cb42baaebdbe37fc3e15f
tree4d9dc30f313e5be53ec5dd9d2cfa80ca4e7f900d
parent8e19c8be87017f6bef8e4c936b1e6ddacb558ad2
bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= 0 (#21895)

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