Original issue. Resolved in the reported scope. sysconfig.get_config_var("Py_GIL_DISABLED") is defined as 1 in the verified POSIX RustPython build.
- Source and standard library:
f39b054b9c8c. - Verified October 5, 2026 on macOS 26.5.2 ARM64.
- RustPython: 0.6.1, Python 3.14.0.alpha; x86_64 through Rosetta.
- Comparison: CPython 3.14.6 ARM64.
Use absolute paths for the variables below:
RP: the RustPython executable for this commit.CP: the CPython 3.14.6 executable.SRC: the source directory at this commit, including its matchingLib.CASE: the directory containing the files shown below.
Shell variables replace recorded absolute paths. Export them so the Python inputs can use them:
export RP CP SRC CASE
unset PYTHONPATH PYTHONHOME PYTHONWARNINGS PYTHONSTARTUP
export PYTHONDONTWRITEBYTECODE=1export LC_ALL=en_US.UTF-8Save as probe-6429.py.
import sys, sysconfig
value = sysconfig.get_config_var("Py_GIL_DISABLED")
print(value)
print("type", type(value).__name__)
print("implementation", sys.implementation.name)
print("platform", sys.platform)
print("gil_enabled", getattr(sys, "_is_gil_enabled", lambda: "unavailable")())cd "$SRC"RustPython:
RUSTPYTHONPATH="$SRC/Lib" "$RP" -B -S "$CASE/probe-6429.py"CPython:
"$CP" -B -S "$CASE/probe-6429.py"Expected: The tested RustPython build must expose its build-time Py_GIL_DISABLED setting instead of None.
Exit code: 0. No timeout.
stdout:
1
type int
implementation rustpython
platform darwin
gil_enabled False
stderr:
No output.
Exit code: 0. No timeout.
stdout:
0
type int
implementation cpython
platform darwin
gil_enabled True
stderr:
No output.
Previously recorded at e227956a58f0; exit code 0. This run was not repeated alongside the current results. Historical inputs may differ from the expanded checks above.
stdout:
None
Historical output excerpt; runner metadata and repeated shutdown warnings are omitted.
PR #6428: expose the build-time Py_GIL_DISABLED value.
CPython can legitimately return a different value. This is not proof of full free-threading or C-extension compatibility.
First fixing commit: not established.
Recorded executable SHA-256 values:
-
RustPython:
d57429291c1011b8b311758237cb66a6fecc22f8647ff14094f5c00fb489d871. -
CPython:
58eea46bd68c84e30980ca1133d1b0efb139c878a4934a519dba0846b74069ef.
AI assistance: OpenAI Codex.