summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/futures.py
diff options
context:
space:
mode:
authorKristján Valur Jónsson <sweskman@gmail.com>2024-01-08 19:57:48 (GMT)
committerGitHub <noreply@github.com>2024-01-08 19:57:48 (GMT)
commit52161781a6134a4b846500ad68004fe9027a233c (patch)
treeedde409239812f1cfcfa1b0de1bc4d57ffcbf22c /Lib/asyncio/futures.py
parentc6ca562138a0916192f9c3100cae678c616aed29 (diff)
downloadcpython-52161781a6134a4b846500ad68004fe9027a233c.zip
cpython-52161781a6134a4b846500ad68004fe9027a233c.tar.gz
cpython-52161781a6134a4b846500ad68004fe9027a233c.tar.bz2
GH-111693: Propagate correct asyncio.CancelledError instance out of asyncio.Condition.wait() (#111694)
Also fix a race condition in `asyncio.Semaphore.acquire()` when cancelled.
Diffstat (limited to 'Lib/asyncio/futures.py')
-rw-r--r--Lib/asyncio/futures.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py
index 97fc4e3..d19e5d8 100644
--- a/Lib/asyncio/futures.py
+++ b/Lib/asyncio/futures.py
@@ -138,9 +138,6 @@ class Future:
exc = exceptions.CancelledError()
else:
exc = exceptions.CancelledError(self._cancel_message)
- exc.__context__ = self._cancelled_exc
- # Remove the reference since we don't need this anymore.
- self._cancelled_exc = None
return exc
def cancel(self, msg=None):