Skip to content

Commit f0d1664

Browse files
committed
rename GIL_MINSIZE to _GIL_MINSIZE
1 parent f791c73 commit f0d1664

9 files changed

+10
-10
lines changed

Lib/test/test_hashlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def find_gil_minsize(*modules_names, default=2048):
104104
module = importlib.import_module(module_name)
105105
except ImportError:
106106
continue
107-
gil_minsize = max(gil_minsize, module.GIL_MINSIZE)
107+
gil_minsize = max(gil_minsize, module._GIL_MINSIZE)
108108
return gil_minsize
109109

110110

Lib/test/test_hmac.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ def HMAC(self, key, msg=None):
11571157

11581158
@property
11591159
def gil_minsize(self):
1160-
return _hashlib.GIL_MINSIZE
1160+
return _hashlib._GIL_MINSIZE
11611161

11621162

11631163
class BuiltinUpdateTestCase(BuiltinModuleMixin,
@@ -1170,7 +1170,7 @@ def HMAC(self, key, msg=None):
11701170

11711171
@property
11721172
def gil_minsize(self):
1173-
return self.hmac.GIL_MINSIZE
1173+
return self.hmac._GIL_MINSIZE
11741174

11751175

11761176
class CopyBaseTestCase:

Modules/_hashopenssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2361,7 +2361,7 @@ hashlib_exception(PyObject *module)
23612361
static int
23622362
hashlib_constants(PyObject *module)
23632363
{
2364-
if (PyModule_AddIntConstant(module, "GIL_MINSIZE",
2364+
if (PyModule_AddIntConstant(module, "_GIL_MINSIZE",
23652365
HASHLIB_GIL_MINSIZE) < 0)
23662366
{
23672367
return -1;

Modules/blake2module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ blake2_exec(PyObject *m)
229229
// good a place as any to probe the CPU flags.
230230
detect_cpu_features(&st->flags);
231231

232-
ADD_INT_CONST("GIL_MINSIZE", HASHLIB_GIL_MINSIZE);
232+
ADD_INT_CONST("_GIL_MINSIZE", HASHLIB_GIL_MINSIZE);
233233

234234
st->blake2b_type = (PyTypeObject *)PyType_FromModuleAndSpec(
235235
m, &blake2b_type_spec, NULL);

Modules/hmacmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,7 @@ hmacmodule_init_globals(PyObject *module, hmacmodule_state *state)
16881688
return -1; \
16891689
} \
16901690
} while (0)
1691-
ADD_INT_CONST("GIL_MINSIZE", HASHLIB_GIL_MINSIZE);
1691+
ADD_INT_CONST("_GIL_MINSIZE", HASHLIB_GIL_MINSIZE);
16921692
#undef ADD_INT_CONST
16931693
return 0;
16941694
}

Modules/md5module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ md5_exec(PyObject *m)
370370
if (PyModule_AddObjectRef(m, "MD5Type", (PyObject *)st->md5_type) < 0) {
371371
return -1;
372372
}
373-
if (PyModule_AddIntConstant(m, "GIL_MINSIZE", HASHLIB_GIL_MINSIZE) < 0) {
373+
if (PyModule_AddIntConstant(m, "_GIL_MINSIZE", HASHLIB_GIL_MINSIZE) < 0) {
374374
return -1;
375375
}
376376

Modules/sha1module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ _sha1_exec(PyObject *module)
368368
return -1;
369369
}
370370
if (PyModule_AddIntConstant(module,
371-
"GIL_MINSIZE",
371+
"_GIL_MINSIZE",
372372
HASHLIB_GIL_MINSIZE) < 0)
373373
{
374374
return -1;

Modules/sha2module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ static int sha2_exec(PyObject *module)
895895
}
896896

897897
if (PyModule_AddIntConstant(module,
898-
"GIL_MINSIZE",
898+
"_GIL_MINSIZE",
899899
HASHLIB_GIL_MINSIZE) < 0)
900900
{
901901
return -1;

Modules/sha3module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ _sha3_exec(PyObject *m)
642642
if (PyModule_AddStringConstant(m, "implementation", "HACL") < 0) {
643643
return -1;
644644
}
645-
if (PyModule_AddIntConstant(m, "GIL_MINSIZE", HASHLIB_GIL_MINSIZE) < 0) {
645+
if (PyModule_AddIntConstant(m, "_GIL_MINSIZE", HASHLIB_GIL_MINSIZE) < 0) {
646646
return -1;
647647
}
648648

0 commit comments

Comments
 (0)