diff --git a/src/packaging/tags.py b/src/packaging/tags.py index dc0bbb6d..89f19261 100644 --- a/src/packaging/tags.py +++ b/src/packaging/tags.py @@ -164,7 +164,7 @@ def _cpython_abis(py_version: PythonVersion, warn: bool = False) -> List[str]: has_ext = "_d.pyd" in EXTENSION_SUFFIXES if with_debug or (with_debug is None and (has_refcount or has_ext)): debug = "d" - if py_version >= (3, 13) and _get_config_var("Py_NOGIL", warn): + if py_version >= (3, 13) and _get_config_var("Py_GIL_DISABLED", warn): threading = "t" if py_version < (3, 8): with_pymalloc = _get_config_var("WITH_PYMALLOC", warn) diff --git a/tests/test_tags.py b/tests/test_tags.py index e7f1c583..9821fc25 100644 --- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -907,7 +907,7 @@ def test__generic_abi_disable_gil(self, monkeypatch): "Py_DEBUG": False, "EXT_SUFFIX": ".cpython-313t-x86_64-linux-gnu.so", "WITH_PYMALLOC": 0, - "Py_NOGIL": 1, + "Py_GIL_DISABLED": 1, } monkeypatch.setattr(sysconfig, "get_config_var", config.__getitem__) assert tags._generic_abi() == ["cp313t"] @@ -941,7 +941,7 @@ def test__generic_abi_old_windows(self, monkeypatch): "EXT_SUFFIX": ".pyd", "Py_DEBUG": 0, "WITH_PYMALLOC": 0, - "Py_NOGIL": 0, + "Py_GIL_DISABLED": 0, } monkeypatch.setattr(sysconfig, "get_config_var", config.__getitem__) assert tags._generic_abi() == tags._cpython_abis(sys.version_info[:2])