Fix GraalPy version parsing on dev builds (#5609)

* Fix GraalPy version parsing on dev builds

* Unskip test on GraalPy
This commit is contained in:
Michael Šimáček
2025-04-09 18:09:15 +02:00
committed by GitHub
parent a28ea8ccc5
commit 708ce4d9c7
2 changed files with 1 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ GRAALPY = sys.implementation.name == "graalpy"
_graalpy_version = ( _graalpy_version = (
sys.modules["__graalpython__"].get_graalvm_version() if GRAALPY else "0.0.0" sys.modules["__graalpython__"].get_graalvm_version() if GRAALPY else "0.0.0"
) )
GRAALPY_VERSION = tuple(int(t) for t in _graalpy_version.split(".")[:3]) GRAALPY_VERSION = tuple(int(t) for t in _graalpy_version.split("-")[0].split(".")[:3])
PY_GIL_DISABLED = bool(sysconfig.get_config_var("Py_GIL_DISABLED")) PY_GIL_DISABLED = bool(sysconfig.get_config_var("Py_GIL_DISABLED"))

View File

@@ -223,7 +223,6 @@ def test_custom_func():
assert m.roundtrip(m.custom_function)(4) == 36 assert m.roundtrip(m.custom_function)(4) == 36
@pytest.mark.skipif("env.GRAALPY", reason="TODO debug segfault")
def test_custom_func2(): def test_custom_func2():
assert m.custom_function2(3) == 27 assert m.custom_function2(3) == 27
assert m.roundtrip(m.custom_function2)(3) == 27 assert m.roundtrip(m.custom_function2)(3) == 27