Skip to content
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

New REPL repeats prompt with newline after each key #127068

Open
Kurpaph opened this issue Nov 20, 2024 · 1 comment
Open

New REPL repeats prompt with newline after each key #127068

Kurpaph opened this issue Nov 20, 2024 · 1 comment
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error

Comments

@Kurpaph
Copy link

Kurpaph commented Nov 20, 2024

Bug report

Bug description:

# Add a code block here, if required
>>> input("word\n")
word
word
word
word
word
word
hello
'hello'

When using Python 3.13.0 with the interpreter on Windows Terminal, I tried to write a simple input message to the user with a line break. It resulted in a repetition of the message for every character I wrote and every pressing of a key on the keyboard (including backspace). It does not affect the usability of the input command, but it is annoying.
The bug reproduced on Windows 10 and Windows 11. It does not appear to happen not on the IDLE nor on VSCode.
Windows 11 24H2
Windows 10 22H2

CPython versions tested on:

3.13

Operating systems tested on:

Windows

@Kurpaph Kurpaph added the type-bug An unexpected behavior, bug, or error label Nov 20, 2024
@terryjreedy terryjreedy added 3.13 bugs and security fixes 3.14 new features, bugs and security fixes topic-repl Related to the interactive shell labels Nov 20, 2024
@terryjreedy
Copy link
Member

Verified not in 3.12, starts in 3.13, so new REPL. Repetition starts with 2nd keypress.

@terryjreedy terryjreedy changed the title Input message duplication when adding \n New REPL repeats prompt with newline after each key Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 new features, bugs and security fixes topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants