Files
Michael BiancoandGitHub 9bf3d9a540 test: freethreaded python version (#523)
* test: add example for free-threaded Python support

Generated-by: aiautocommit

* test(snapshot): update python-freethreaded build plan snapshot

Generated-by: aiautocommit
2026-03-24 08:00:02 -06:00

11 lines
337 B
Python

import platform
import sys
import sysconfig
# Py_GIL_DISABLED == 1 means the binary was built without the GIL (free-threaded build)
is_freethreaded = sysconfig.get_config_var("Py_GIL_DISABLED") == 1
print(f"Python {sys.version.split()[0]}")
print(f"Free-threaded build: {is_freethreaded}")
print(f"Architecture: {platform.machine()}")