python / python/cpython

Line-wrapped syntax highlighting in Python shell spills over into program output

Aperta
#152,068 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

OS-mac stdlib 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:

As shown here, when I make the input long enough that the range gets wrapped with a backtick, all subsequent lines until the next command prompt become the same cyan as the text of range.
Image
Tangentially, is there any way to have Python itself stop doing this when the VScode terminal already did it for me in a way I find preferable (since it doesn't insert line-breaks into long one-liners copied from the shell)?

issue 140334 is similar, but this affects the shell, not just IDLE.

CPython versions tested on:

3.14

Operating systems tested on:

macOS, in both VScode and the terminal.

Linked PRs
  • gh-152108
  • gh-153029
  • gh-154402

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

Riproduci l’input avvolto in Python 3.14 usando il terminale macOS e VS Code, quindi confronta il comportamento con l’issue 140334. Traccia la gestione dell’evidenziazione della sintassi della shell Python e verifica che l’output del programma dopo un comando avvolto non erediti più il colore dell’input; le PR collegati gh-152108, gh-153029 e gh-154402 indicano che il lavoro è già in corso.

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
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.