Skip to content

explicitly disable GIL? #192

@orbeckst

Description

@orbeckst

I am running the tests on Linux x86_64, Python 3.14 and get the message

======================================================= warnings summary =======================================================
<frozen importlib._bootstrap>:491
  <frozen importlib._bootstrap>:491: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module 'distopia.pydistopia', which has not declared that it can run safely without the GIL. To override this behavior and keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================== 193 passed, 1 warning in 18.78s ================================================

that suggests one could disable the GIL.

I am trying

PYTHON_GIL=0 pytest -vvv

and all the tests still pass (and the warning disappeared).

Is it possible to explicitly disable the GIL for the import?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions