Skip to content

Returning DISABLE from a sys.monitoring callback can trigger an assert in a debug build in (3.12b4) #106895

Closed
@jpe

Description

@jpe

Returning DISABLE from a sys.monitoring callback for an event >= PY_MONITORING_INSTRUMENTED_EVENTS triggers an assert in a debug build. It would probably be better to just ignore a DISABLE return value since anything else can be returned (I think) or mandate that None be returned. If the current behavior is retained, it should be documented.

I didn't test in a non debug build.

Linked PRs

Metadata

Metadata

Assignees

Labels

3.12only security fixes3.13bugs and security fixestype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions