bpo-44256: Do not expose _functools._list_elem_type (GH-26416)

It is internal use only type.
This commit is contained in:
Inada Naoki 2021-05-28 14:09:32 +09:00 committed by GitHub
parent 28f12c9f4f
commit 28be3191a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1460,9 +1460,8 @@ _functools_exec(PyObject *module)
if (state->lru_list_elem_type == NULL) {
return -1;
}
if (PyModule_AddType(module, state->lru_list_elem_type) < 0) {
return -1;
}
// lru_list_elem is used only in _lru_cache_wrapper.
// So we don't expose it in module namespace.
return 0;
}