PyCode_Addr2Line point to out of date PEP 626
未关闭
还没有人认领这个 Issue。
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:
- 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