PyCode_Addr2Line point to out of date PEP 626
未關閉
還沒有人認領這個 Issue。
docs
topic-C-API
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- 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:
- Document that
PyCode_Addr2Linemay be O(N) in the size of the code. This is important and not obvious! - Describe how to iterate efficiently in the docs.
- In a future version of Python, expose the functions as public, documented, unstable C APIs. (I think
PyUnstablemakes sense for these)
Linked PRs
- gh-156736
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 PyCode_Addr2Line 文件開始,將其中對 PEP 626 的參照與 issue 中描述的重新命名後位址範圍函式進行比較。先檢查連結的 PR gh-156736;當複雜度說明和有效率的反覆運算指引準確無誤,且任何未來的 API 公開都被明確分開時,文件工作即告完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- api, documentation
- Issue 類型
- 文件
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100