Skip to content

Commit 35be1f3

Browse files
bpo-44256: Do not expose _functools._list_elem_type (GH-26416)
It is internal use only type. (cherry picked from commit 28be319) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
1 parent 448abe8 commit 35be1f3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Modules/_functoolsmodule.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,9 +1460,8 @@ _functools_exec(PyObject *module)
14601460
if (state->lru_list_elem_type == NULL) {
14611461
return -1;
14621462
}
1463-
if (PyModule_AddType(module, state->lru_list_elem_type) < 0) {
1464-
return -1;
1465-
}
1463+
// lru_list_elem is used only in _lru_cache_wrapper.
1464+
// So we don't expose it in module namespace.
14661465

14671466
return 0;
14681467
}

0 commit comments

Comments
 (0)