Suggestion: append info about code block number in filename
まだ誰も着手していません。
評価
調査の方向性
一時ファイル名が作成される ipykernel/compiler.py の 50 行目付近から始め、そのファイル名を組み立てる時点でコードブロック番号がどのように利用可能なのかを追跡してください。traceback エントリに対して望ましいファイル名形式を確認し、compiler または一時ファイルの命名に関する既存のテストを確認してください。ファイル名が読み取り可能なパス情報を失わずにコードブロック番号を保持していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When using IPython, the "filename" contains the number information of the code block that contains it; this is something of the form <ipython-input-N-...> where N is the code block number.

When actual temporary files are used in the ipykernel, the names created on https://github.com/ipython/ipykernel/blob/b2f1a79f64c49a1c54f2e7c79c062d6b347b9bf0/ipykernel/compiler.py#L50 lose that information.
My suggestion would be to append _number to the filename where number is the code block number. So, instead of path/to/filename.py one would have path/to/filename_number.py. This would enable a human reader to identify which code block is involved in the traceback.
Additionally, while it is currently possible to programmatically obtain the information and having a "filename" much more understable, as demonstrated in the image below, there can be some ambiguity if the exact same content appears in two code blocks, one of which appearing in a traceback (as shown in the second traceback in the image below).
Adding the _number would remove this ambiguity.

- 主要言語
- Python
- スター
- 734
- フォーク
- 411
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 9
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ipython/ipykernel のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
ipython/ipykernel の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
anthropics/skills#1811 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
speaches-ai/speaches#678 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
datalayer/mcp-compose#42 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
conda-forge/spacy-feedstock#177 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
UKGovernmentBEIS/inspect_evals#2523 ·