Commit da2e6e3
Narrow BaseException suppress in _run_sync KI/SystemExit bounded-wait arm
The KI/SystemExit cleanup arm of ``_run_sync`` wrapped
``future.result(timeout=1.0)`` in
``contextlib.suppress(BaseException)``. A SECOND
KeyboardInterrupt / SystemExit delivered during the
1-second bounded wait was silently swallowed — denying
the user's Ctrl-C escalation from "cancel this op" to
"abort the process" for up to 1 second.
Mirror the sibling timeout arm's narrow shape: catch
``CancelledError`` + ``TimeoutError`` (cancellation
acknowledged), DEBUG-log other ``Exception`` (programming
bug in cleanup is observable), and let KI/SystemExit
propagate. The original (first) KI is still re-raised by
the trailing ``raise`` after the cleanup.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ef3d079 commit da2e6e3
1 file changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
863 | | - | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
864 | 873 | | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
865 | 884 | | |
866 | 885 | | |
867 | 886 | | |
| |||
0 commit comments