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

3.11: tracing revisits class line after class docstring #90489

Closed
nedbat opened this issue Jan 10, 2022 · 5 comments
Closed

3.11: tracing revisits class line after class docstring #90489

nedbat opened this issue Jan 10, 2022 · 5 comments
Assignees
Labels
3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@nedbat
Copy link
Member

nedbat commented Jan 10, 2022

BPO 46331
Nosy @nedbat, @markshannon, @erlend-aasland
PRs
  • bpo-46331: Do not set line number of instruction storing doc-string. #30518
  • 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/markshannon'
    closed_at = <Date 2022-01-12.12:36:55.961>
    created_at = <Date 2022-01-10.14:17:57.176>
    labels = ['interpreter-core', '3.11']
    title = '3.11: tracing revisits class line after class docstring'
    updated_at = <Date 2022-01-14.14:30:52.716>
    user = 'https://github.com/nedbat'

    bugs.python.org fields:

    activity = <Date 2022-01-14.14:30:52.716>
    actor = 'Mark.Shannon'
    assignee = 'Mark.Shannon'
    closed = True
    closed_date = <Date 2022-01-12.12:36:55.961>
    closer = 'erlendaasland'
    components = ['Interpreter Core']
    creation = <Date 2022-01-10.14:17:57.176>
    creator = 'nedbat'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46331
    keywords = ['patch', '3.11regression']
    message_count = 5.0
    messages = ['410217', '410296', '410297', '410301', '410392']
    nosy_count = 3.0
    nosy_names = ['nedbat', 'Mark.Shannon', 'erlendaasland']
    pr_nums = ['30518']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue46331'
    versions = ['Python 3.11']

    @nedbat
    Copy link
    Member Author

    nedbat commented Jan 10, 2022

    See the starred line in the trace output for 3.11:

    $ cat class_def.py
    class theClass:
        ''' the docstring. '''
        def __init__(self):
            ''' Another docstring. '''
            self.a = 1
    
    $ python3.10 -c "import sys; print(sys.version)"
    3.10.1 (main, Dec 14 2021, 08:30:13) [Clang 12.0.0 (clang-1200.0.32.29)]
    
    $ python3.10 -m trace --trace class_def.py
     --- modulename: class_def, funcname: <module>
    class_def.py(1): class theClass:
     --- modulename: class_def, funcname: theClass
    class_def.py(1): class theClass:
    class_def.py(2):     ''' the docstring. '''
    class_def.py(3):     def __init__(self):
    
    $ python3.11 -c "import sys; print(sys.version)"
    3.11.0a3+ (heads/main:0fc58c1e05, Jan  8 2022, 19:45:58) [Clang 12.0.0 (clang-1200.0.32.29)]
    
    $ python3.11 -m trace --trace class_def.py
     --- modulename: class_def, funcname: <module>
    class_def.py(1): class theClass:
     --- modulename: class_def, funcname: theClass
    class_def.py(1): class theClass:
    class_def.py(2):     ''' the docstring. '''
    class_def.py(1): class theClass:                    <<<*********
    class_def.py(3):     def __init__(self):

    @nedbat nedbat added 3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Jan 10, 2022
    @markshannon
    Copy link
    Member

    New changeset bd04fac by Mark Shannon in branch 'main':
    bpo-46331: Do not set line number of instruction storing doc-string. (GH-30518)
    bd04fac

    @erlend-aasland
    Copy link
    Contributor

    I recon this can be closed now?

    @markshannon
    Copy link
    Member

    Ned, does this fix work for you?

    @nedbat
    Copy link
    Member Author

    nedbat commented Jan 12, 2022

    Yes, thanks, this fixes it.

    @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.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants