python / python/cpython

Ctrl-c not behaving as expected

Open
#95,737 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.10 OS-windows type-bug
Dominant language
Python
Stars
77.2k
Forks
36k
PR merge metrics
PR metrics pending

Description

Bug report

ctrl-c does not raise a keyboard interrupt. Problem started when modifed VS 2022 installation to include windows 10 sdk from the visual studio installer. I have already tried to repair and reinstall python and restart my computer but it the problem stays the same. when python is run in shell mode it just exits when ctrl-c is pressed but does not raise the KeyboardInterrupt when ctrl-c is pressed in script without exiting.

Your environment

  • CPython versions tested on: 3.10.5
  • Operating system and architecture: windows 10

https://user-images.githubusercontent.com/94297407/183242398-c253b51d-9997-4318-ae65-bb2a7df739da.mp4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names CPython 3.10.5 on Windows 10 but no source files, tests, commands, or reproducible script. Start by reproducing Ctrl-C in shell mode and in a script, then trace the relevant Windows interrupt behavior. Done means the expected KeyboardInterrupt behavior is reproduced and covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.