python / python/cpython

Python 3.13: Pressing the Tab key while in the REPL prints 4 spaces instead of 1 tab (breaking backspace)

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

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

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

説明

Bug report

Bug description:

Tested on 3.12:
In the <=3.12 Python REPL on Linux, I can press the tab key, and a tab character is printed in the console. I can then use the backspace key to undo that whole tab character.

Tested on 3.13:
In the 3.13 Python REPL on Linux, if I type a tab character, it seems to convert it to 4 spaces, and thus pressing the backspace key once only deletes 1/4 of the indentation.


This is either a bug, or if it's a feature, it should be configurable and without changing the sane defaults from <=3.12.
How can I get back to the <=3.12 behaviour?

CPython versions tested on:

3.12, 3.13

Operating systems tested on:

Linux, macOS

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

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

はじめの一歩

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

調査の方向性

まず、Linux または macOS 上の Python 3.12 および 3.13 の REPL で Tab と backspace の動作を再現し、報告されているインデント処理を比較します。Tab 入力の変換を担当する REPL の入力経路を追跡し、その後、解決された動作が <=3.12 の動作と一致するか、要求された設定を提供することを確認します。

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

評価

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

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

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