◐ Shell
clean mode source ↗

bpo-37658: Fix asyncio.wait_for() to respect waited task status by elprans · Pull Request #21894 · python/cpython

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.

elprans added a commit to MagicStack/asyncpg that referenced this pull request

Aug 16, 2020
`asyncio.wait_for()` currently has a bug where it raises a
`CancelledError` even when the wrapped awaitable has completed.
The upstream fix is in python/cpython#21894.  This adds a workaround
until the aforementioned PR is merged, backported and released.

Fixes: #467
Fixes: #547
Related: #468
Supersedes: #548

elprans added a commit to MagicStack/asyncpg that referenced this pull request

Aug 16, 2020
`asyncio.wait_for()` currently has a bug where it raises a
`CancelledError` even when the wrapped awaitable has completed.
The upstream fix is in python/cpython#21894.  This adds a workaround
until the aforementioned PR is merged, backported and released.

Co-authored-by: Adam Liddell <git@aliddell.com>
Fixes: #467
Fixes: #547
Related: #468
Supersedes: #548

1st1

1st1 approved these changes Aug 18, 2020

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Aug 26, 2020
…onGH-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.
(cherry picked from commit a2118a1)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Aug 26, 2020
…onGH-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.
(cherry picked from commit a2118a1)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>

ambv pushed a commit that referenced this pull request

Aug 26, 2020
…1894) (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 a2118a1)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>

1st1 pushed a commit that referenced this pull request

Aug 26, 2020
…1894) (#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 a2118a1)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>

elprans added a commit to elprans/cpython that referenced this pull request

Aug 26, 2020
…pythonGH-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..
(cherry picked from commit a2118a1)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>

elprans added a commit to MagicStack/asyncpg that referenced this pull request

Aug 27, 2020
`asyncio.wait_for()` currently has a bug where it raises a
`CancelledError` even when the wrapped awaitable has completed.
The upstream fix is in python/cpython#21894.  This adds a workaround
until the aforementioned PR is merged, backported and released.

Co-authored-by: Adam Liddell <git@aliddell.com>
Fixes: #467
Fixes: #547
Related: #468
Supersedes: #548

xzy3 pushed a commit to xzy3/cpython that referenced this pull request

Oct 18, 2020
…on#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.

ods added a commit to ods/cpython that referenced this pull request

May 13, 2021

@ods ods mentioned this pull request

May 13, 2021