Skip to content

Commit

Permalink
Rename Py_NOGIL to Py_GIL_DISABLED (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Nov 21, 2023
1 parent 992b399 commit a2b3e34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/packaging/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit a2b3e34

Please sign in to comment.