diff options
author | Brett Cannon <brett@python.org> | 2012-04-15 20:08:47 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-15 20:08:47 (GMT) |
commit | 6f44d66bc491bad5b8d897a68da68e009e27829d (patch) | |
tree | 311e790c6611c8dc6af47bdadce99e9730fda9fe /Python/pythonrun.c | |
parent | 7788838473aa3993d29fcf9de25605d492f25d29 (diff) | |
download | cpython-6f44d66bc491bad5b8d897a68da68e009e27829d.zip cpython-6f44d66bc491bad5b8d897a68da68e009e27829d.tar.gz cpython-6f44d66bc491bad5b8d897a68da68e009e27829d.tar.bz2 |
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 b64a9bf..44a85bb 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); |