Issue #14605: Use None in sys.path_importer_cache to represent no
finder instead of using some (now non-existent) implicit finder.
diff --git a/Python/import.c b/Python/import.c
index 103e7de..a47e988 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1186,15 +1186,7 @@
PyErr_Clear();
}
if (importer == NULL) {
- importer = PyObject_CallFunctionObjArgs(
- (PyObject *)&PyNullImporter_Type, p, NULL
- );
- if (importer == NULL) {
- if (PyErr_ExceptionMatches(PyExc_ImportError)) {
- PyErr_Clear();
- return Py_None;
- }
- }
+ return Py_None;
}
if (importer != NULL) {
int err = PyDict_SetItem(path_importer_cache, p, importer);