PyCode_Addr2Line point to out of date PEP 626
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PyCode_Addr2Line documentation and compare its PEP 626 reference with the renamed address-range functions described in the issue. Check the linked PR gh-156736 first; the documentation work is done when the complexity note and efficient-iteration guidance are accurate, with any future API exposure clearly separated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100