Skip to content

Commit 4fa376b

Browse files
authored
gh-111863: Rename term Py_NOGIL to Py_GIL_DISABLED in sysconfig (gh-112307)
1 parent 46500c4 commit 4fa376b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Lib/test/test_sys.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,8 +1209,8 @@ def test_pystats(self):
12091209
@unittest.skipUnless(hasattr(sys, 'abiflags'), 'need sys.abiflags')
12101210
def test_disable_gil_abi(self):
12111211
abi_threaded = 't' in sys.abiflags
1212-
py_nogil = (sysconfig.get_config_var('Py_GIL_DISABLED') == 1)
1213-
self.assertEqual(py_nogil, abi_threaded)
1212+
py_gil_disabled = (sysconfig.get_config_var('Py_GIL_DISABLED') == 1)
1213+
self.assertEqual(py_gil_disabled, abi_threaded)
12141214

12151215

12161216
@test.support.cpython_only

Modules/_sysconfig.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ _sysconfig_config_vars_impl(PyObject *module)
5858
#endif
5959

6060
#ifdef Py_GIL_DISABLED
61-
PyObject *py_nogil = _PyLong_GetOne();
61+
PyObject *py_gil_disabled = _PyLong_GetOne();
6262
#else
63-
PyObject *py_nogil = _PyLong_GetZero();
63+
PyObject *py_gil_disabled = _PyLong_GetZero();
6464
#endif
65-
if (PyDict_SetItemString(config, "Py_GIL_DISABLED", py_nogil) < 0) {
65+
if (PyDict_SetItemString(config, "Py_GIL_DISABLED", py_gil_disabled) < 0) {
6666
Py_DECREF(config);
6767
return NULL;
6868
}

0 commit comments

Comments
 (0)