Skip to content

inspect.getsource() returns incorrect source lines at the module level #50949

@ggenellina

Description

@ggenellina
BPO 6700
Nosy @taleinat, @devdanzin, @PCManticore, @aivarannamaa, @1st1, @jamesls, @miss-islington
PRs
  • bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks #8864
  • [3.7] bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (GH-8864) #8898
  • [3.6] bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (GH-8864) #8899
  • [2.7] bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (GH-8864) #8900
  • Files
  • inspect.diff: patch against trunk
  • show_inspect_bug.py
  • issue6700.patch
  • 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 2018-08-26.08:47:22.187>
    created_at = <Date 2009-08-14.04:19:21.635>
    labels = ['3.7', '3.8', 'type-bug', 'library']
    title = 'inspect.getsource() returns incorrect source lines at the module level'
    updated_at = <Date 2018-08-26.08:47:22.186>
    user = 'https://bugs.python.org/ggenellina'

    bugs.python.org fields:

    activity = <Date 2018-08-26.08:47:22.186>
    actor = 'taleinat'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-08-26.08:47:22.187>
    closer = 'taleinat'
    components = ['Library (Lib)']
    creation = <Date 2009-08-14.04:19:21.635>
    creator = 'ggenellina'
    dependencies = []
    files = ['14716', '14717', '30344']
    hgrepos = []
    issue_num = 6700
    keywords = ['patch']
    message_count = 8.0
    messages = ['91541', '102651', '189842', '324000', '324002', '324004', '324114', '324115']
    nosy_count = 8.0
    nosy_names = ['ggenellina', 'taleinat', 'ajaksu2', 'Claudiu.Popa', 'Aivar.Annamaa', 'yselivanov', 'jamesls', 'miss-islington']
    pr_nums = ['8864', '8898', '8899', '8900']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue6700'
    versions = ['Python 2.7', 'Python 3.6', 'Python 3.7', 'Python 3.8']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of life3.8 (EOL)end of lifestdlibStandard 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