python / python/cpython

PyCode_Addr2Line point to out of date PEP 626

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

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

docs topic-C-API
主要言語
Python
スター
77.2k
フォーク
35.9k
PR マージ指標
PR 指標を取得中

説明

Documentation

The docs for PyCode_Addr2Line say:

For efficiently iterating over the line numbers in a code object, use the API described in PEP 626.

That section of the PEP describes PyCodeAddressRange, PyLineTable_InitAddressRange, PyLineTable_NextAddressRange, and PyLineTable_PreviousAddressRange . Those function have been renamed with a _ prefix. Some are not exported symbols (even in private headers). That's fine for the PEP, we treat them as historical documents, but the docs should be up to date.

Ideally we:

  1. Document that PyCode_Addr2Line may be O(N) in the size of the code. This is important and not obvious!
  2. Describe how to iterate efficiently in the docs.
  3. In a future version of Python, expose the functions as public, documented, unstable C APIs. (I think PyUnstable makes sense for these)
Linked PRs
  • gh-156736

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

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

はじめの一歩

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

調査の方向性

PyCode_Addr2Line のドキュメントから始め、その PEP 626 への参照を、issue で説明されている名前変更後のアドレス範囲関数と比較してください。まずリンク先の PR gh-156736 を確認してください。複雑性に関する注記と効率的な反復処理のガイダンスが正確で、将来の API 公開については明確に分けて記載されていれば、ドキュメント作業は完了です。

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

評価

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

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

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