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

the frame of a suspended generator should not have a local trace function #66347

Open
xdegaye mannequin opened this issue Aug 5, 2014 · 2 comments
Open

the frame of a suspended generator should not have a local trace function #66347

xdegaye mannequin opened this issue Aug 5, 2014 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@xdegaye
Copy link
Mannequin

xdegaye mannequin commented Aug 5, 2014

BPO 22149
Nosy @abalkin, @benjaminp, @xdegaye
Files
  • generator_f_trace.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 = None
    created_at = <Date 2014-08-05.20:39:23.909>
    labels = ['interpreter-core', 'type-bug']
    title = 'the frame of a suspended generator should not have a local trace function'
    updated_at = <Date 2019-03-15.22:20:38.657>
    user = 'https://github.com/xdegaye'

    bugs.python.org fields:

    activity = <Date 2019-03-15.22:20:38.657>
    actor = 'BreamoreBoy'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2014-08-05.20:39:23.909>
    creator = 'xdegaye'
    dependencies = []
    files = ['36277']
    hgrepos = []
    issue_num = 22149
    keywords = ['patch']
    message_count = 2.0
    messages = ['224887', '238863']
    nosy_count = 3.0
    nosy_names = ['belopolsky', 'benjamin.peterson', 'xdegaye']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue22149'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Aug 5, 2014

    When tracing, the frame of a suspended generator should not have an f_trace function as there is no way to delete the frame f_trace attribute in that case even though
    tracing may have been disabled.

    The patch relies on the fact that whenever the generator is resumed, a 'call' tracing event is issued and the generator's frame f_trace is set again.
    As expected, frames, including generators' frames, have their f_trace attribute cleared on the 'return' tracing event that is issued when the frame goes out of scope
    or when the system's trace function has been removed.

    @xdegaye xdegaye mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Aug 5, 2014
    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Mar 22, 2015

    Can we have a formal patch review please. I've assumed that if acceptable the patch could also be applied to 3.4 and 2.7.

    @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
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants