You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PyCode_Addr2Line point to out of date PEP 626 #156725
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_Addr2Line may 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 PyUnstable makes sense for these)
Reading the issue, this looks like a documentation-clarity gap rather than a code defect: the current page doesn't give readers enough to self-diagnose, which is why it surfaces here as an issue instead of being answered by the docs.
Plan: locate the relevant section, confirm what the code actually does today (so the docs match behavior, not intent), tighten the wording, and scan neighboring pages for the same inconsistency — otherwise the fix just relocates the confusion.
One thing to confirm before writing: minimal correction scoped to this page, or also cross-link from related guides if the same gap shows up there?
Activity
pythongh-156725: document O(N) behavior of PyCode_Addr2Line and the p…
LeonxLJX commentedon Sep 3, 2026
I'd like to take this one.
Reading the issue, this looks like a documentation-clarity gap rather than a code defect: the current page doesn't give readers enough to self-diagnose, which is why it surfaces here as an issue instead of being answered by the docs.
Plan: locate the relevant section, confirm what the code actually does today (so the docs match behavior, not intent), tighten the wording, and scan neighboring pages for the same inconsistency — otherwise the fix just relocates the confusion.
One thing to confirm before writing: minimal correction scoped to this page, or also cross-link from related guides if the same gap shows up there?
(claiming via @LeonxLJX)
pythongh-156725: document O(N) behavior of PyCode_Addr2Line and the p…
Merge branch 'main' into pythongh-156725-code-addrtoline-docs
gh-156725: Document O(N) behavior of `PyCode_Addr2Line` (GH-156736)
[3.14] gh-156725: Document O(N) behavior of `PyCode_Addr2Line` (GH-15…
[3.15] gh-156725: Document O(N) behavior of `PyCode_Addr2Line` (GH-15…