Skip to content

CTRL+C/KeyboardInterrupt in editline not working properly on macOS REPL #100610

Open
@milosivanovic

Description

@milosivanovic

Bug report

With the following in ~/.editrc:

bind "^R" em-inc-search-prev

Pressing CTRL+R inside the macOS-bundled python (/usr/bin/python3, which is compiled against editline) to enter editline history, and then pressing CTRL+C does not properly remove "bck" and does not write KeyboardInterrupt until CTRL+C is pressed two more times for a total of three times.

In other words, inside an editline history search, CTRL+C needs to be sent three times to get back to the normal REPL state.

This video may help with understanding the issue: Homebrew/homebrew-core#118869 (comment)

Your environment

  • CPython versions tested on: 3.9.6
  • Operating system and architecture: macOS Monterey 12.6.1 / M1 / arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-mactopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions