diff options
| author | Kristján Valur Jónsson <sweskman@gmail.com> | 2024-01-08 19:57:48 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-08 19:57:48 (GMT) |
| commit | 52161781a6134a4b846500ad68004fe9027a233c (patch) | |
| tree | edde409239812f1cfcfa1b0de1bc4d57ffcbf22c /Lib/asyncio/futures.py | |
| parent | c6ca562138a0916192f9c3100cae678c616aed29 (diff) | |
| download | cpython-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.py | 3 |
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): |
