Skip to content

uv enters infinite KeyboardInterrupt loop in interactive shell #13919

@piehld

Description

@piehld

Summary

When I am in the interactive Python shell (uv run python) and type Ctrl + c to issue a KeyboardInterrupt, the shell enters an infinite loop that's impossible to get out of. Below is a GIF demonstrating the behavior:

Image

I believe this relates to these other issues: #12108 and #13429. However, I didn't see this particular example being shared, so I wanted to provide a simple demonstration of the issue I'm observing. Please feel free to close this as a duplicate, but thought this example case might helpful.

Platform

macOS 15.4, Darwin 24.4.0 arm64

Version

uv 0.7.9 (Homebrew 2025-05-30)

Python version

Python 3.12.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContribution especially encouraged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions