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

It is internal use only type.
(cherry picked from commit 28be3191a9)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-05-28 00:10:45 -07:00 committed by GitHub
parent 448abe8d8b
commit 35be1f3602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

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;
}