Skip to content

inspect.getsource(SomeClass) doesn't show @decorators #60060

@takluyver

Description

@takluyver
mannequin
BPO 15856
Nosy @takluyver, @1st1, @tirkarthi
Superseder
  • bpo-35113: inspect.getsource returns incorrect source for classes when class definition is part of multiline strings
  • 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 2019-08-31.10:47:09.340>
    created_at = <Date 2012-09-03.15:13:44.404>
    labels = ['3.8', 'type-bug', 'library']
    title = "inspect.getsource(SomeClass) doesn't show @decorators"
    updated_at = <Date 2020-04-18.16:19:39.465>
    user = 'https://github.com/takluyver'

    bugs.python.org fields:

    activity = <Date 2020-04-18.16:19:39.465>
    actor = 'xtreak'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-08-31.10:47:09.340>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2012-09-03.15:13:44.404>
    creator = 'takluyver'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 15856
    keywords = []
    message_count = 4.0
    messages = ['169767', '222682', '340966', '366726']
    nosy_count = 3.0
    nosy_names = ['takluyver', 'yselivanov', 'xtreak']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '35113'
    type = 'behavior'
    url = 'https://bugs.python.org/issue15856'
    versions = ['Python 3.8']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)end of lifestdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions