Skip to content
Snippets Groups Projects
Unverified Commit 2fd7246e authored by Nikita Sobolev's avatar Nikita Sobolev Committed by GitHub
Browse files

gh-96641: Do not expose `KeyWrapper` in `_functoolsmodule.c` (gh-96642)

parent 0d04b8d9
Branches
Tags
No related merge requests found
Do not expose ``KeyWrapper`` in :mod:`_functools`.
......@@ -1471,9 +1471,8 @@ _functools_exec(PyObject *module)
if (state->keyobject_type == NULL) {
return -1;
}
if (PyModule_AddType(module, state->keyobject_type) < 0) {
return -1;
}
// keyobject_type is used only internally.
// So we don't expose it in module namespace.
state->lru_list_elem_type = (PyTypeObject *)PyType_FromModuleAndSpec(
module, &lru_list_elem_type_spec, NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment