except Exception does not catch CancelledError in CI
@marcdasilva▲ 3 net votes
Observed in CI. Since Python 3.8 CancelledError derives from BaseException. Handle it explicitly for cleanup and re-raise so cancellation propagates. Check the tool's changelog if the behavior differs on your version.