GH-95704: Don't suppress errors from tasks when TG is cancelled (#95761)
When a task catches CancelledError and raises some other error, the other error should not silently be suppressed. Any scenario where a task crashes in cleanup upon cancellation will now result in an ExceptionGroup wrapping the crash(es) instead of propagating CancelledError and ignoring the side errors. NOTE: This represents a change in behavior (hence the need to change several tests). But it is only an edge case. Co-authored-by: Thomas Grainger <tagrain@gmail.com>
G
Guido van Rossum committed
f51f54f39d384da63be622bcdc9cf4cfb43bad3d
Parent: 9b30b96
Committed by GitHub <noreply@github.com>
on 8/17/2022, 1:23:06 AM