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

break/continue or return in finally block occurs twice in trace. #86811

Closed
markshannon opened this issue Dec 15, 2020 · 2 comments
Closed

break/continue or return in finally block occurs twice in trace. #86811

markshannon opened this issue Dec 15, 2020 · 2 comments
Assignees
Labels
3.10 only security fixes type-bug An unexpected behavior, bug, or error

Comments

@markshannon
Copy link
Member

BPO 42645
Nosy @nedbat, @markshannon
PRs
  • bpo-42645: Make sure that return/break/continue are only traced once when exiting via a finally block. #23780
  • 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 2020-12-17.13:56:51.132>
    created_at = <Date 2020-12-15.12:21:32.578>
    labels = ['type-bug', '3.10']
    title = 'break/continue or return in finally block occurs twice in trace.'
    updated_at = <Date 2020-12-17.13:56:51.131>
    user = 'https://github.com/markshannon'

    bugs.python.org fields:

    activity = <Date 2020-12-17.13:56:51.131>
    actor = 'Mark.Shannon'
    assignee = 'Mark.Shannon'
    closed = True
    closed_date = <Date 2020-12-17.13:56:51.132>
    closer = 'Mark.Shannon'
    components = []
    creation = <Date 2020-12-15.12:21:32.578>
    creator = 'Mark.Shannon'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 42645
    keywords = ['patch']
    message_count = 2.0
    messages = ['383044', '383165']
    nosy_count = 2.0
    nosy_names = ['nedbat', 'Mark.Shannon']
    pr_nums = ['23780']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue42645'
    versions = ['Python 3.10']

    @markshannon
    Copy link
    Member Author

    This function

    def f():
         try:
             return 2
         finally:
             4

    would generate a try of [1, 2, 4, 2]. It should generate [1, 2, 4]
    and not trace the return twice.

    @markshannon markshannon added the 3.10 only security fixes label Dec 15, 2020
    @markshannon markshannon self-assigned this Dec 15, 2020
    @markshannon markshannon added type-bug An unexpected behavior, bug, or error 3.10 only security fixes labels Dec 15, 2020
    @markshannon markshannon self-assigned this Dec 15, 2020
    @markshannon markshannon added the type-bug An unexpected behavior, bug, or error label Dec 15, 2020
    @markshannon
    Copy link
    Member Author

    New changeset 5274b68 by Mark Shannon in branch 'master':
    bpo-42645: Make sure that return/break/continue are only traced once when exiting via a finally block. (GH-23780)
    5274b68

    @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.10 only security fixes type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant