[Python-checkins] bpo-32528: Document the change in inheritance of asyncio.CancelledError (GH-21474)

Miss Islington (bot) webhook-mailer at python.org
Sun Jul 19 03:51:02 EDT 2020


https://github.com/python/cpython/commit/700cb6617545cdb8a9e16bb2e6efe90788a60d4d
commit: 700cb6617545cdb8a9e16bb2e6efe90788a60d4d
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-07-19T00:50:54-07:00
summary:

bpo-32528: Document the change in inheritance of asyncio.CancelledError (GH-21474)


GH-msg373510

[bpo-32528]()/GH-13528 changed `asyncio.CancelledError` such that it no longer inherits from `concurrent.futures.CancelledError`. As this affects existing code, specifically when catching the latter instead of the former in exception handling, it should be documented in the "What's new in 3.8?" document.

Automerge-Triggered-By: @1st1
(cherry picked from commit 2a5181829af394b82e8e8c917183c709ee72a2b7)

Co-authored-by: JustAnotherArchivist <JustAnotherArchivist at users.noreply.github.com>

files:
M Doc/whatsnew/3.8.rst

diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index d2db5bff5afcf..475e3ab964312 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -648,7 +648,8 @@ loop on every invocation:
 (Contributed by Yury Selivanov in :issue:`37028`.)
 
 The exception :class:`asyncio.CancelledError` now inherits from
-:class:`BaseException` rather than :class:`Exception`.
+:class:`BaseException` rather than :class:`Exception` and no longer inherits
+from :class:`concurrent.futures.CancelledError`.
 (Contributed by Yury Selivanov in :issue:`32528`.)
 
 On Windows, the default event loop is now :class:`~asyncio.ProactorEventLoop`.
@@ -1953,7 +1954,8 @@ Changes in the Python API
   (Contributed by Anthony Sottile in :issue:`36264`.)
 
 * The exception :class:`asyncio.CancelledError` now inherits from
-  :class:`BaseException` rather than :class:`Exception`.
+  :class:`BaseException` rather than :class:`Exception` and no longer inherits
+  from :class:`concurrent.futures.CancelledError`.
   (Contributed by Yury Selivanov in :issue:`32528`.)
 
 * The function :func:`asyncio.wait_for` now correctly waits for cancellation



More information about the Python-checkins mailing list