Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracemalloc's format() doc contradictory #86204

Closed
lisroach opened this issue Oct 14, 2020 · 7 comments
Closed

Tracemalloc's format() doc contradictory #86204

lisroach opened this issue Oct 14, 2020 · 7 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir easy

Comments

@lisroach
Copy link
Contributor

BPO 42038
Nosy @ambv, @lisroach, @pablogsal, @miss-islington, @akulakov
PRs
  • bpo-42038: fix description of returned list of lines #27529
  • [3.10] bpo-42038: fix description of returned list of lines (GH-27529) #28428
  • [3.9] bpo-42038: fix description of returned list of lines (GH-27529) #28429
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-09-17.22:56:58.340>
    created_at = <Date 2020-10-14.17:09:06.363>
    labels = ['easy', '3.11', '3.9', '3.10', 'docs']
    title = "Tracemalloc's format() doc contradictory"
    updated_at = <Date 2021-10-04.19:18:42.491>
    user = 'https://github.com/lisroach'

    bugs.python.org fields:

    activity = <Date 2021-10-04.19:18:42.491>
    actor = 'pablogsal'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2021-09-17.22:56:58.340>
    closer = 'lukasz.langa'
    components = ['Documentation']
    creation = <Date 2020-10-14.17:09:06.363>
    creator = 'lisroach'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 42038
    keywords = ['patch', 'easy', 'newcomer friendly']
    message_count = 7.0
    messages = ['378636', '398715', '402102', '402106', '402107', '402108', '403158']
    nosy_count = 6.0
    nosy_names = ['docs@python', 'lukasz.langa', 'lisroach', 'pablogsal', 'miss-islington', 'andrei.avk']
    pr_nums = ['27529', '28428', '28429']
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue42038'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @lisroach
    Copy link
    Contributor Author

    Tracemalloc's format documentation (https://docs.python.org/3/library/tracemalloc.html#tracemalloc.Traceback.format) says first:

    "Format the traceback as a list of lines with newlines."

    then:

    "Similar to the traceback.format_tb() function, except that format() does not include newlines."

    The first statement is incorrect, tracemalloc does NOT add newlines to the list. I recommend just removing the "with newlines" in the first statement.

    @lisroach lisroach added 3.7 (EOL) end of life 3.8 only security fixes 3.10 only security fixes 3.9 only security fixes labels Oct 14, 2020
    @lisroach lisroach added docs Documentation in the Doc dir 3.7 (EOL) end of life 3.8 only security fixes 3.10 only security fixes 3.9 only security fixes labels Oct 14, 2020
    @lisroach lisroach added docs Documentation in the Doc dir easy labels Oct 14, 2020
    @akulakov
    Copy link
    Contributor

    akulakov commented Aug 1, 2021

    I agree that the doc is wrong; I've put up the tiny PR here:
    https://github.com/python/cpython/pull/27529/files

    Note that linecache.getline() returns line with \n but is then .strip()'ed.

    @ambv
    Copy link
    Contributor

    ambv commented Sep 17, 2021

    New changeset aca0e08 by andrei kulakov in branch 'main':
    bpo-42038: fix description of returned list of lines (GH-27529)
    aca0e08

    @ambv
    Copy link
    Contributor

    ambv commented Sep 17, 2021

    New changeset bba2332 by Miss Islington (bot) in branch '3.10':
    bpo-42038: fix description of returned list of lines (GH-27529) (GH-28428)
    bba2332

    @ambv
    Copy link
    Contributor

    ambv commented Sep 17, 2021

    New changeset 6302701 by Miss Islington (bot) in branch '3.9':
    bpo-42038: fix description of returned list of lines (GH-27529) (GH-28429)
    6302701

    @ambv
    Copy link
    Contributor

    ambv commented Sep 17, 2021

    Thanks! ✨ 🍰 ✨

    @ambv ambv closed this as completed Sep 17, 2021
    @ambv ambv closed this as completed Sep 17, 2021
    @terryjreedy terryjreedy added 3.11 only security fixes and removed 3.7 (EOL) end of life 3.8 only security fixes labels Sep 19, 2021
    @pablogsal
    Copy link
    Member

    New changeset 84d56ec by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
    bpo-42038: fix description of returned list of lines (GH-27529) (GH-28428)
    84d56ec

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes docs Documentation in the Doc dir easy
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants