Skip to content

gh-154167: Fix test suite hang when SIGINT is ignored#154168

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:regrtest-sigint
Jul 20, 2026
Merged

gh-154167: Fix test suite hang when SIGINT is ignored#154168
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:regrtest-sigint

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 19, 2026

Copy link
Copy Markdown
Member

Restore the default SIGINT handler in regrtest setup_process() when there is no Python-level handler. Python inherits the SIG_IGN disposition when the test suite runs as a shell background job; then asyncio.Runner does not install its own handler and _thread.interrupt_main() is a no-op, which makes some tests in test_asyncio and test_threading hang.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes tests Tests in the Lib/test dir labels Jul 19, 2026
@serhiy-storchaka
serhiy-storchaka merged commit 1047cbb into python:main Jul 20, 2026
68 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@serhiy-storchaka
serhiy-storchaka deleted the regrtest-sigint branch July 20, 2026 14:14
@bedevere-app

bedevere-app Bot commented Jul 20, 2026

Copy link
Copy Markdown

GH-154265 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 20, 2026
@bedevere-app

bedevere-app Bot commented Jul 20, 2026

Copy link
Copy Markdown

GH-154266 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 20, 2026
@bedevere-app

bedevere-app Bot commented Jul 20, 2026

Copy link
Copy Markdown

GH-154267 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant