From 6f44d66bc491bad5b8d897a68da68e009e27829d Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sun, 15 Apr 2012 16:08:47 -0400 Subject: Issue #13959: Rename imp to _imp and add Lib/imp.py and begin rewriting functionality in pure Python. To start, imp.new_module() has been rewritten in pure Python, put into importlib (privately) and then publicly exposed in imp. --- Python/pythonrun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index b64a9bf7962..44a85bb3559 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -225,8 +225,8 @@ import_init(PyInterpreterState *interp, PyObject *sysmod) if (Py_VerboseFlag) { PySys_FormatStderr("import sys # builtin\n"); } - if (PyDict_SetItemString(sys_modules, "imp", impmod) < 0) { - Py_FatalError("Py_Initialize: can't save imp to sys.modules"); + if (PyDict_SetItemString(sys_modules, "_imp", impmod) < 0) { + Py_FatalError("Py_Initialize: can't save _imp to sys.modules"); } value = PyObject_CallMethod(importlib, "_setup", "OO", sysmod, impmod); -- cgit v1.2.3