python / python/cpython

New REPL repeats prompt with newline after each key

オープン
#127,068 コメント 7 件 リアクション 7 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

3.13 3.14 3.15 stdlib topic-repl type-bug
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

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

Linked PRs
  • gh-139465
  • gh-142817

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Windows Terminal 上の Python 3.13 REPL で input("word\n") を使い、入力とバックスペースを含めて問題を再現してください。さらに調査する前に、リンクされている PR gh-139465 と gh-142817 を確認してください。完了とは、報告されている Windows バージョンで入力を編集しても、キーを押すたびにプロンプトや改行が繰り返されなくなることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
cli, operating-systems
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。