Should CancelledError derive from BaseException?
Open
- Dominant language
- Python
- Stars
- 27
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Currently when a task is cancelled we use `concurrent.futures.CancelledError`, which derives from `Exception`, rather than `BaseException`. The problem with this is that code that catches `Exception` will also capture `CancelledError` and may thus inadvertently swallow the cancellation. We might want to use an exception type that derives from `BaseException` instead, so that it will propagate by default unless the user does something to explicitly catch it.
Contributor guide
Assessment
This issue has not been assessed yet.