Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
The current de-instrumentation code for instructions incorrectly de-instruments line too. So if INSTRUCTION events are removed, event if the LINE events are still there, it won't trigger the event.
importsysE=sys.monitoring.eventsdefline(*args): print("Line event: ", args) definst(*args): print("Instruction event: ", args) sys.monitoring.use_tool_id(0, "test") sys.monitoring.set_events(0, 0) sys.monitoring.register_callback(0, E.LINE, line) sys.monitoring.register_callback(0, E.INSTRUCTION, inst) sys.monitoring.set_events(0, E.LINE|E.INSTRUCTION) sys.monitoring.set_events(0, E.LINE) a=1sys.monitoring.set_events(0, 0)CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error