CTRL+C/KeyboardInterrupt in editline not working properly on macOS REPL
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 36k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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: https://github.com/Homebrew/homebrew-core/issues/118869#issuecomment-1365364374
Your environment
- CPython versions tested on: 3.9.6
- Operating system and architecture: macOS Monterey 12.6.1 / M1 / arm64
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere das Problem in der mit macOS gebündelten /usr/bin/python3-REPL mit dem angegebenen ~/.editrc-Binding und verfolge anschließend die Einstiegspunkte für die editline-History-Suche und die CTRL+C-Behandlung. Fertig ist die Aufgabe, wenn ein einziges CTRL+C die History-Suche sauber beendet und KeyboardInterrupt schreibt, statt drei Tastendrücke zu erfordern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- cli, operating-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100