Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-32528: Document the change in inheritance of asyncio.CancelledErr…
…or (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 2a51818)

Co-authored-by: JustAnotherArchivist <JustAnotherArchivist@users.noreply.github.com>
  • Loading branch information
JustAnotherArchivist authored and miss-islington committed Jul 14, 2020
commit 99475ead382dedce53e206c8c80026c5f488352b
6 changes: 4 additions & 2 deletions Doc/whatsnew/3.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,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`.
Expand Down Expand Up @@ -1951,7 +1952,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
Expand Down