Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 76331:d777f854a66e
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.
| author | Brett Cannon <brett@python.org> |
|---|---|
| date | Sun, 15 Apr 2012 16:08:47 -0400 |
| parents | c7bf93802f5d |
| children | 57d558f1904d |
line wrap: on
line diff
--- a/Python/pythonrun.c Sun Apr 15 15:25:10 2012 -0400 +++ b/Python/pythonrun.c Sun Apr 15 16:08:47 2012 -0400 @@ -225,8 +225,8 @@ 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);
