Skip to content

Add an "assert mode" to -X showrefcount that fails when references leak #94755

Open
@encukou

Description

@encukou

The -X showrefcount option currently prints the number of references at exit.
Once we get the number to 0, we should test that it stays that way. It would be nice to add a mode, say -X showrefcount=assert0 or -X checkrefcount, that exits with nonzero if refs/blocks remain. Then it can be used in subprocess tests.

cc @vstinner

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions