bpo-32528: Make asyncio.CancelledError a BaseException. by 1st1 · Pull Request #13528 · python/cpython
This will address the common mistake many asyncio users make: an "except Exception" clause breaking Tasks cancellation. In addition to this change, we stop inheriting asyncio.TimeoutError and asyncio.InvalidStateError from their concurrent.futures.* counterparts. There's no point for these exceptions to share the inheritance chain.
DinoV pushed a commit to DinoV/cpython that referenced this pull request
Jan 14, 2020This will address the common mistake many asyncio users make: an "except Exception" clause breaking Tasks cancellation. In addition to this change, we stop inheriting asyncio.TimeoutError and asyncio.InvalidStateError from their concurrent.futures.* counterparts. There's no point for these exceptions to share the inheritance chain. In 3.9 we'll focus on implementing supervisors and cancel scopes, which should allow better handling of all exceptions, including SystemExit and KeyboardInterrupt
miss-islington pushed a commit that referenced this pull request
Jul 14, 2020…or (GH-21474) #msg373510 [bpo-32528]()/#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
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
Jul 14, 2020…or (pythonGH-21474) GH-msg373510 [bpo-32528]()/pythonGH-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>
This was referenced
Jul 14, 2020miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
Jul 14, 2020…or (pythonGH-21474) GH-msg373510 [bpo-32528]()/pythonGH-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>
miss-islington added a commit that referenced this pull request
Jul 19, 2020…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>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
Jul 24, 2020…or (pythonGH-21474) GH-msg373510 [bpo-32528]()/pythonGH-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>
miss-islington added a commit that referenced this pull request
Jul 24, 2020…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>
hoffmang9 pushed a commit to Chia-Network/chia-blockchain that referenced this pull request
Jul 27, 2020hoffmang9 pushed a commit to Chia-Network/chia-blockchain that referenced this pull request
Jul 27, 2020shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request
Aug 4, 2020…or (pythonGH-21474) #msg373510 [bpo-32528]()/python#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
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request
Aug 20, 2020…or (pythonGH-21474) #msg373510 [bpo-32528]()/python#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
xzy3 pushed a commit to xzy3/cpython that referenced this pull request
Oct 18, 2020…or (pythonGH-21474) #msg373510 [bpo-32528]()/python#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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters