diff options
author | Brett Cannon <brett@python.org> | 2012-04-15 16:08:47 -0400 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-15 16:08:47 -0400 |
commit | 6d17cfc162c054f5c39bd2c7dbde2a6513924722 (patch) | |
tree | 94dbeaebeb4eeac6742235798176d940d0717f31 /Python/pythonrun.c | |
parent | be6182fadc91798891b844ebaf68a5ceb14a5e1a (diff) | |
download | cpython-6d17cfc162c054f5c39bd2c7dbde2a6513924722.tar.gz |
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.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index b64a9bf796..44a85bb355 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); |