Skip to content

Add @support.requires_gil_enabled decorator to mark tests that require the GIL #117478

@colesbury

Description

@colesbury

Feature or enhancement

@Eclips4 points out that it might be time to add a dedicated decorator for marking tests that require the GIL:

He writes:

I think this helper should look like this:

def requires_gil_enabled(test):
    if Py_GIL_DISABLED:
        return unittest.skip('needs the GIL enabled')(test)
    return test

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions