python / python/cpython

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

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

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

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

説明

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

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

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

はじめの一歩

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

調査の方向性

macOS ターミナルと VS Code を使って Python 3.14 でラップされた入力を再現し、その後、issue 140334 と動作を比較します。Python シェルの構文ハイライト処理を追跡し、ラップされたコマンドの後のプログラム出力が入力の色を継承しなくなっていることを確認します。関連する PR gh-152108、gh-153029、gh-154402 は、すでに作業が進行中であることを示しています。

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

評価

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

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

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