-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Python 3.13+ REPL inserts ~ on [Del] [PgUp] [PgDn] with TERM=vt100 #124027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
I think this might be a ncurses thing. Trying to figure out which one... but it's getting late. |
Adding this keymap entry solves the delete case:
|
hroncok
added a commit
to hroncok/cpython
that referenced
this issue
Sep 13, 2024
From Fedora's /etc/inputrc: "\e[5~": history-search-backward "\e[6~": history-search-forward "\e[3~": delete-char Fixes python#124027
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Sep 13, 2024
…124028) pyrepl: Support Del, PgUp, and PgDn on TERM=vt100 From Fedora's /etc/inputrc: "\e[5~": history-search-backward "\e[6~": history-search-forward "\e[3~": delete-char Fixes python#124027 (cherry picked from commit f4e5643) Co-authored-by: Miro Hrončok <[email protected]>
pablogsal
pushed a commit
that referenced
this issue
Sep 13, 2024
… (#124029) gh-124027: Support Del, PgUp, and PgDn on TERM=vt100 (GH-124028) pyrepl: Support Del, PgUp, and PgDn on TERM=vt100 From Fedora's /etc/inputrc: "\e[5~": history-search-backward "\e[6~": history-search-forward "\e[3~": delete-char Fixes #124027 (cherry picked from commit f4e5643) Co-authored-by: Miro Hrončok <[email protected]>
dnicolodi
pushed a commit
to dnicolodi/repllib
that referenced
this issue
Jan 29, 2025
…8) (#124029) gh-124027: Support Del, PgUp, and PgDn on TERM=vt100 (GH-124028) pyrepl: Support Del, PgUp, and PgDn on TERM=vt100 From Fedora's /etc/inputrc: "\e[5~": history-search-backward "\e[6~": history-search-forward "\e[3~": delete-char Fixes python/cpython#124027 (cherry picked from commit f4e5643df64d0c2a009ed224560044b3409a47c0) Co-authored-by: Miro Hrončok <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug report
Bug description:
I've noticed that the Python 3.13+ REPL misbehaves in a mock shell environment. Whenever I press Del, PgUp, or PgDn, a literal
~
character is inserted.tl;dr this happens when you run
TERM=vt100 python3.13
.Details:
I did not know what was special about the mock shell, but this did not happen with the old readline-based REPL.
When trying to figure out what's different in the mock shell I looked at
env
and it was:I found out that to reproduce, all I have to do is to set
TERM=vt100
. I don't know the actual meaning of that, but it changes the behavior of the new REPL, but not the old.Pressing either of Del, PgUp, or PgDn (possibly other keys?) adds a literal
~
instead of doing any of the expected actions (history traverse up, down, deleting the next character if any).Pressing either of Del, PgUp, or PgDn does what it is supposed to do.
To reproduce my actual use case, first install mock. The easiest way is to use podman (or docker) with Fedora. Following https://rpm-software-management.github.io/mock/#mock-inside-podman-fedora-toolbox-or-docker-container
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: