Expose no‑GIL readiness axis and add pyisolate doctor CLI#208
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
pyisolate/nogil.pymodule that detects whether CPython was built with--disable-gil, queries the process GIL state when available, enumerates imported native extension modules, acceptsPYISOLATE_NOGIL_SAFE_MODULESto mark audited modules as no‑GIL safe, and produces ano_gil_readiness_report()with aparallel_cellsvsscheduled_compartmentsaxis.RuntimeWarningon free‑threaded builds when imported native extensions are present but not declared safe, with opt‑out viaPYISOLATE_WARN_UNSAFE_NOGIL_EXTENSIONS.pyisolate/doctor.py, adding a top‑levelpyisolateentrypoint inpyisolate/cli.py, and includingno_gilinpyisolate/provenance.pysopyisolate-doctor/pyisolate doctorcan reportgilandextensions(human and--json) information.no_gil_readiness_reportandwarn_if_unsafe_native_extensionsfrom the package root and add short documentation toREADME.md, plus small test coverage additions intests/test_provenance.py.Testing
python -m compileall -q pyisolatesuccessfully.pytest -q tests/test_provenance.py tests/test_sandbox.py::test_spawn_returns_sandboxand observed the targeted tests pass.python -m pyisolate.doctor gilandpython -m pyisolate.doctor extensions --jsonand confirmed expected human and JSON output.pytest -q), but the run fails in the current environment with an existing order‑dependent test/stub interaction where_StubBPFManager.load()was mutated earlier in the run and raisesTypeError: _StubBPFManager.load() got an unexpected keyword argument 'mode', so full‑suite results are blocked by that unrelated test ordering issue.Codex Task