Skip to content

Document traceback.print_list #127347

Closed
Closed

Description

@tomasr8

Activity

  1. serhiy-storchaka commented on Nov 29, 2024

    @serhiy-storchaka
    Member

    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.

  2. tomasr8 commented on Nov 29, 2024

    @tomasr8
    MemberAuthor

    You're right, I should've done some research to understand why it's undocumented. I'll check tomorrow :)

  3. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Nov 30, 2024
  4. tomasr8 commented on Nov 30, 2024

    @tomasr8
    MemberAuthor

    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.

  5. serhiy-storchaka commented on Nov 30, 2024

    @serhiy-storchaka
    Member

    What about __all__. format_list was not initially in __all__.

  6. Eclips4 commented on Nov 30, 2024

    @Eclips4
    Member

    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.)

  7. serhiy-storchaka commented on Dec 2, 2024

    @serhiy-storchaka
    Member

    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.

  8. added a commit that references this issue on Dec 3, 2024
  9. added 2 commits that reference this issue on Dec 3, 2024
  10. StanFromIreland commented on Dec 3, 2024

    @StanFromIreland
    Member

    This issue can be closed. A PR has been merged and just backports are left.

  11. tomasr8 commented on Dec 3, 2024

    @tomasr8
    MemberAuthor

    This issue can be closed. A PR has been merged and just backports are left.

    The backports still require some manual work, I'd prefer to keep this open until they are merged as well :)

  12. added 2 commits that reference this issue on Dec 4, 2024
  13. added a commit that references this issue on Jan 8, 2025
  14. added a commit that references this issue on Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directory

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions