Content-Length: 253768 | pFad | https://github.com/python/cpython/issues/117385

FD sys.settrace set some events without callbacks · Issue #117385 · python/cpython · GitHub
Skip to content

sys.settrace set some events without callbacks #117385

@gaogaotiantian

Description

@gaogaotiantian

Bug report

Bug description:

sys.settrace sets PY_MONITORING_EVENT_BRANCH and PY_MONITORING_EVENT_EXCEPTION_HANDLED monitoring events but does not have any registered callbacks. Those two events should not generate any legacy trace events (and sys.settrace works fine without it for a long time), so we should just remove those.

This improves trace performance a bit (~3% for fib + empty tracefunc) as the events do not fire anymore.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/117385

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy