https://github.com/python/cpython/commit/29952c86f3f8a972203a1ccd8381448efe145ada
commit: 29952c86f3f8a972203a1ccd8381448efe145ada
branch: main
author: Matan Perelman <[email protected]>
committer: gvanrossum <[email protected]>
date: 2024-01-29T11:12:33-08:00
summary:
TaskGroup: Use explicit None check for cancellation error (#114708)
files:
M Lib/asyncio/taskgroups.py
diff --git a/Lib/asyncio/taskgroups.py b/Lib/asyncio/taskgroups.py
index e1c56d140bef7d..f322b1f6653f6a 100644
--- a/Lib/asyncio/taskgroups.py
+++ b/Lib/asyncio/taskgroups.py
@@ -132,7 +132,7 @@ async def __aexit__(self, et, exc, tb):
# Propagate CancelledError if there is one, except if there
# are other errors -- those have priority.
- if propagate_cancellation_error and not self._errors:
+ if propagate_cancellation_error is not None and not self._errors:
raise propagate_cancellation_error
if et is not None and not issubclass(et, exceptions.CancelledError):
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]