8000 gh-140824: workaround math.integer module name for sys.stdlib_module_… · python/cpython@adc2bd0 · GitHub
[go: up one dir, main page]

Skip to content

Commit adc2bd0

Browse files
committed
gh-140824: workaround math.integer module name for sys.stdlib_module_names
1 parent 6ea3f8c commit adc2bd0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Python/sysmodule.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2899,6 +2899,14 @@ list_stdlib_module_names(void)
28992899
Py_DECREF(names);
29002900
return NULL;
29012901
}
2902+
if (PyUnicode_EqualToUTF8(name, "_math_integer")) {
2903+
Py_DECREF(name);
2904+
name = PyUnicode_FromString("math.integer");
2905+
if (name == NULL) {
2906+
Py_DECREF(names);
2907+
return NULL;
2908+
}
2909+
}
29022910
PyTuple_SET_ITEM(names, i, name);
29032911
}
29042912

0 commit comments

Comments
 (0)
0