python / python/cpython

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

Aperta
#125,923 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

3.13 topic-repl type-bug
Lingua principale
Python
Stelle
77.2k
Fork
35.9k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il comportamento di Tab e backspace nella REPL di Python 3.12 e 3.13 su Linux o macOS, confrontando la gestione dell'indentazione riportata. Traccia il percorso di input della REPL responsabile della conversione dell'input Tab, quindi verifica che il comportamento risultante corrisponda al comportamento <=3.12 o fornisca la configurazione richiesta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
cli
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.