python / python/cpython

New REPL repeats prompt with newline after each key

未關閉
#127,068 7 則留言 7 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

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. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 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 摘要。