Skip to content

New REPL repeats prompt with newline after each key #127068

@Kurpaph

Description

@Kurpaph

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixestopic-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