forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-102780: Fix uncancel() call in asyncio timeouts (pythonGH-10…
…2815) Also use `raise TimeOut from <CancelledError instance>` so that the CancelledError is set in the `__cause__` field rather than in the `__context__` field. (cherry picked from commit 04adf2d) Co-authored-by: Kristján Valur Jónsson <[email protected]> Co-authored-by: Guido van Rossum <[email protected]> Co-authored-by: Alex Waygood <[email protected]>
- Loading branch information
1 parent
4c1b4ec
commit 0314b21
Showing
4 changed files
with
50 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Library/2023-03-22-16-15-18.gh-issue-102780.NEcljy.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The :class:`asyncio.Timeout` context manager now works reliably even when performing cleanup due | ||
to task cancellation. Previously it could raise a | ||
:exc:`~asyncio.CancelledError` instead of an :exc:`~asyncio.TimeoutError` in such cases. |