]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-102780: Fix uncancel() call in asyncio timeouts (#102815)
authorKristján Valur Jónsson <sweskman@gmail.com>
Wed, 22 Mar 2023 17:52:10 +0000 (17:52 +0000)
committerGitHub <noreply@github.com>
Wed, 22 Mar 2023 17:52:10 +0000 (10:52 -0700)
commit04adf2df395ded81922c71360a5d66b597471e49
treee00fe057435866b27b7fa66465d2d6d9b47745c1
parent1ca315538f2f9da6c7b86c4c46e76d454c1ec4b9
gh-102780: Fix uncancel() call in asyncio timeouts (#102815)

Also use `raise TimeOut from <CancelledError instance>` so that the CancelledError is set
in the `__cause__` field rather than in the `__context__` field.

Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Doc/library/asyncio-task.rst
Lib/asyncio/timeouts.py
Lib/test/test_asyncio/test_timeouts.py
Misc/NEWS.d/next/Library/2023-03-22-16-15-18.gh-issue-102780.NEcljy.rst [new file with mode: 0644]