Skip to content

Commit 28be319

Browse files
authored
bpo-44256: Do not expose _functools._list_elem_type (pythonGH-26416)
It is internal use only type.
1 parent 28f12c9 commit 28be319

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)