comparison Python/pythonrun.c @ 76566:57d558f1904d

Issue #14605: Make explicit the entries on sys.path_hooks that used to be implicit. Added a warning for when sys.path_hooks is found to be empty. Also changed the meaning of None in sys.path_importer_cache to represent trying sys.path_hooks again (an interpretation of previous semantics). Also added a warning for when None was found. The long-term goal is for None in sys.path_importer_cache to represent the same as imp.NullImporter: no finder found for that sys.path entry.
author Brett Cannon <brett@python.org>
date Wed, 25 Apr 2012 20:54:04 -0400
parents d777f854a66e
children eb68502731dd
comparison
equal deleted inserted replaced
76565:bc91c251a4e9 76566:57d558f1904d
227 } 227 }
228 if (PyDict_SetItemString(sys_modules, "_imp", impmod) < 0) { 228 if (PyDict_SetItemString(sys_modules, "_imp", impmod) < 0) {
229 Py_FatalError("Py_Initialize: can't save _imp to sys.modules"); 229 Py_FatalError("Py_Initialize: can't save _imp to sys.modules");
230 } 230 }
231 231
232 value = PyObject_CallMethod(importlib, "_setup", "OO", sysmod, impmod); 232 value = PyObject_CallMethod(importlib, "_install", "OO", sysmod, impmod);
233 if (value == NULL) { 233 if (value == NULL) {
234 PyErr_Print(); 234 PyErr_Print();
235 Py_FatalError("Py_Initialize: importlib install failed"); 235 Py_FatalError("Py_Initialize: importlib install failed");
236 } 236 }
237 Py_DECREF(value); 237 Py_DECREF(value);