Commit ba59a54
committed
gh-146194: Fix nested KeyboardInterrupt handling in asyncio
- Modify _on_sigint to cancel main task on every SIGINT
- Allow nested cancellations to propagate correctly through multiple levels
- Add test_nested_keyboardinterrupt_handling to test_runners.py
- Add NEWS entry
Fixes issue where third Ctrl+C would crash with:
'Task was destroyed but it is pending!'1 parent 2976259 commit ba59a54
File tree
1 file changed
+3
-3
lines changed- Misc/NEWS.d/next/Library
1 file changed
+3
-3
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
0 commit comments