Skip to content

Latest commit

 

History

History
137 lines (91 loc) · 3.35 KB

README.md

File metadata and controls

137 lines (91 loc) · 3.35 KB

Py_GIL_DISABLED configuration value (#6429)

Original issue. Resolved in the reported scope. sysconfig.get_config_var("Py_GIL_DISABLED") is defined as 1 in the verified POSIX RustPython build.

Environment

  • 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 matching Lib.
  • 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=1
export LC_ALL=en_US.UTF-8

Reproducer

Save 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")())

Run

cd "$SRC"

RustPython:

RUSTPYTHONPATH="$SRC/Lib" "$RP" -B -S "$CASE/probe-6429.py"

CPython:

"$CP" -B -S "$CASE/probe-6429.py"

Results

Expected: The tested RustPython build must expose its build-time Py_GIL_DISABLED setting instead of None.

RustPython

Exit code: 0. No timeout.

stdout:

1
type int
implementation rustpython
platform darwin
gil_enabled False

stderr:

No output.

CPython 3.14.6

Exit code: 0. No timeout.

stdout:

0
type int
implementation cpython
platform darwin
gil_enabled True

stderr:

No output.

Historical failure

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.

Related change and scope

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.

Evidence

Recorded executable SHA-256 values:

AI assistance: OpenAI Codex.