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
Why is it undocumented? Why it has not been added in __all__? What is the difference with format_list()? I have no currently access to my computer, but please research the history of these functions. If it is an oversign, we may need a versionadded directive and maybe even a What's New entry. This may be not a pure documentation issue.
So I did some code archaeology and the function was added in dcc057a together with format_list. Neither were documented in this commit. format_list and a bunch of other functions (except for print_list) were documented (in Doc/lib/libtraceback.tex) two years later in bca1207. The docs were then migrated from tex to rst in 116aa62. To me this just seems like an unintentional omission so I think it makes sense to document it. Not sure if we should add versionadded (can we for such an old function?) or a What's New entry.
What is the difference with format_list()?
print_list is a wrapper on top of format_list which directly prints the stack trace.
What about __all__. format_list was not initially in __all__.
A bunch of __all__ were added in 40fc160, and it seems like an unintentional omission to me. (print_last and print_list sound pretty similar, so it's easy to accidentally skip one of them, I guess.)
Thank you for your investigation. Let document that function, but only add it to __all__ in main (because it may be a breaking change). No versionadded is needed if it was here before 3.0.
Activity
serhiy-storchaka commentedon Nov 29, 2024
Why is it undocumented? Why it has not been added in
__all__? What is the difference withformat_list()? I have no currently access to my computer, but please research the history of these functions. If it is an oversign, we may need a versionadded directive and maybe even a What's New entry. This may be not a pure documentation issue.tomasr8 commentedon Nov 29, 2024
You're right, I should've done some research to understand why it's undocumented. I'll check tomorrow :)
tomasr8 commentedon Nov 30, 2024
So I did some code archaeology and the function was added in dcc057a together with
format_list. Neither were documented in this commit.format_listand a bunch of other functions (except forprint_list) were documented (inDoc/lib/libtraceback.tex) two years later in bca1207. The docs were then migrated from tex to rst in 116aa62. To me this just seems like an unintentional omission so I think it makes sense to document it. Not sure if we should addversionadded(can we for such an old function?) or a What's New entry.print_listis a wrapper on top offormat_listwhich directly prints the stack trace.serhiy-storchaka commentedon Nov 30, 2024
What about
__all__.format_listwas not initially in__all__.Eclips4 commentedon Nov 30, 2024
A bunch of
__all__were added in 40fc160, and it seems like an unintentional omission to me. (print_lastandprint_listsound pretty similar, so it's easy to accidentally skip one of them, I guess.)serhiy-storchaka commentedon Dec 2, 2024
Thank you for your investigation. Let document that function, but only add it to
__all__in main (because it may be a breaking change). No versionadded is needed if it was here before 3.0.gh-127347: Document `traceback.print_list` (#127348)
pythongh-127347: Document `traceback.print_list` (pythonGH-127348)
pythongh-127347: Document `traceback.print_list` (pythonGH-127348)
StanFromIreland commentedon Dec 3, 2024
This issue can be closed. A PR has been merged and just backports are left.
tomasr8 commentedon Dec 3, 2024
The backports still require some manual work, I'd prefer to keep this open until they are merged as well :)
[3.13] gh-127347: Document `traceback.print_list` (GH-127348) (#127569)
[3.12] gh-127347: Document `traceback.print_list` (GH-127348) (#127570)
pythongh-127347: Document `traceback.print_list` (python#127348)
pythongh-127347: Document `traceback.print_list` (python#127348)