Skip to content

Bugs in PyTraceBack_Print() #76130

Closed
Closed

Description

@serhiy-storchaka
BPO 31949
Nosy @tiran, @berkerpeksag, @serhiy-storchaka
PRs
  • bpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). #4289
  • [3.6] bpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). (GH-4289) #4406
  • 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 = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2017-11-15.16:05:18.089>
    created_at = <Date 2017-11-05.14:06:35.003>
    labels = ['interpreter-core', 'type-bug', '3.7']
    title = 'Bugs in PyTraceBack_Print()'
    updated_at = <Date 2018-09-22.19:12:11.434>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2018-09-22.19:12:11.434>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2017-11-15.16:05:18.089>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2017-11-05.14:06:35.003>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31949
    keywords = ['patch']
    message_count = 4.0
    messages = ['305595', '305596', '306274', '306280']
    nosy_count = 3.0
    nosy_names = ['christian.heimes', 'berker.peksag', 'serhiy.storchaka']
    pr_nums = ['4289', '4406']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue31949'
    versions = ['Python 3.6', 'Python 3.7']

    Activity

    1. serhiy-storchaka commented on Nov 5, 2017

      @serhiy-storchaka
      MemberAuthor

      0fbab7f changed the semantic of PyTraceBack_Print and sys.tracebacklimit. It no longer match the documentation and the behavior of the traceback module. Setting sys.tracebacklimit to 0 or less no longer suppress printing tracebacks in PyTraceBack_Print(). Setting sys.tracebacklimit to None (as at shutdown stage) no longer makes PyTraceBack_Print() using default limit, but suppress printing tracebacks and sets a TypeError without returning failure from PyTraceBack_Print().

      The proposed PR restores the initial purposed semantic and fixes several other bugs in PyTraceBack_Print().

      • Setting sys.tracebacklimit to 0 or less now suppress printing tracebacks.
      • Setting sys.tracebacklimit to None now causes using the default limit.
      • Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using the limit LONG_MAX rather than the default limit.
      • Fixed integer overflows in the case of more than 2**31 items on Windows.
      • Fixed output errors handling.
    2. berkerpeksag commented on Nov 5, 2017

      @berkerpeksag
      Member

      Setting sys.tracebacklimit to 0 or less no longer suppress printing
      tracebacks in PyTraceBack_Print().

      This was also reported in bpo-12276.

    3. serhiy-storchaka commented on Nov 15, 2017

      @serhiy-storchaka
      MemberAuthor

      New changeset edad8ee by Serhiy Storchaka in branch 'master':
      bpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). (bpo-4289)
      edad8ee

    4. serhiy-storchaka commented on Nov 15, 2017

      @serhiy-storchaka
      MemberAuthor

      New changeset 3864248 by Serhiy Storchaka in branch '3.6':
      [3.6] bpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). (GH-4289) (bpo-4406)
      3864248

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Labels

    3.7 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions