Skip to content

Changes in traceback broke existing code (Python 3.5) #69566

Closed

Description

@bertjwregeer
BPO 25379
Nosy @bertjwregeer, @berkerpeksag
Superseder
  • bpo-25108: traceback.extract_stack() compatibility break in 3.5
  • 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 2015-10-12.05:37:13.842>
    created_at = <Date 2015-10-12.04:42:20.074>
    labels = ['type-bug', 'library']
    title = 'Changes in traceback broke existing code (Python 3.5)'
    updated_at = <Date 2015-10-12.05:37:13.829>
    user = 'https://github.com/bertjwregeer'

    bugs.python.org fields:

    activity = <Date 2015-10-12.05:37:13.829>
    actor = 'berker.peksag'
    assignee = 'none'
    closed = True
    closed_date = <Date 2015-10-12.05:37:13.842>
    closer = 'berker.peksag'
    components = ['Library (Lib)']
    creation = <Date 2015-10-12.04:42:20.074>
    creator = 'X-Istence'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 25379
    keywords = []
    message_count = 3.0
    messages = ['252841', '252842', '252843']
    nosy_count = 2.0
    nosy_names = ['X-Istence', 'berker.peksag']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '25108'
    type = 'behavior'
    url = 'https://bugs.python.org/issue25379'
    versions = ['Python 3.5']

    Activity

    1. bertjwregeer commented on Oct 12, 2015

      bertjwregeermannequin
      MannequinAuthor

      One of the changes in Python 3.5's traceback functionality broke existing code compared to Python 3.4 by injecting an extra stack frame into the list when using traceback.extract_stack:

      What this looks like on Python 3.5:

      pyramid/tests/test_config/test_init.py 1108 includeme2 config.add_view(view2)
      pyramid/util.py 526 wrapper return wrapped(self, *arg, **defaults)
      pyramid/util.py 557 wrapper f = traceback.extract_stack(limit=4)
      /Users/xistence/.pyenv/versions/3.5.0/lib/python3.5/traceback.py 201 extract_stack stack = StackSummary.extract(walk_stack(f), limit=limit)

      What it used to look like on Python 3.4:

      pyramid/config/init.py 798 include c(configurator)
      pyramid/tests/test_config/test_init.py 1108 includeme2 config.add_view(view2)
      pyramid/util.py 526 wrapper return wrapped(self, *arg, **defaults)
      pyramid/util.py 557 wrapper f = traceback.extract_stack(limit=4)

      Notice that in the Python 3.5 version:

      /Users/xistence/.pyenv/versions/3.5.0/lib/python3.5/traceback.py 201 extract_stack stack = StackSummary.extract(walk_stack(f), limit=limit)

      Is added.

      We are tracking this issue here: Pylons/pyramid#1973 on our side.

    2. bertjwregeer commented on Oct 12, 2015

      bertjwregeermannequin
      MannequinAuthor

      Looks like this is a dup of: https://bugs.python.org/issue25108

    3. berkerpeksag commented on Oct 12, 2015

      @berkerpeksag
      Member

      Thanks for the report! Yes, this is a duplicate of bpo-25108. It would be great if you have time to test it with the current 3.5 branch.

    4. added
      stdlibStandard Library Python modules in the Lib/ directory
      on Oct 12, 2015
    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

    Assignees

    No one assigned

      Labels

      stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions