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.
This commit is contained in:
Brett Cannon 2012-04-15 16:08:47 -04:00
parent 7788838473
commit 6f44d66bc4
10 changed files with 2850 additions and 2814 deletions

View file

@ -143,7 +143,7 @@ struct _inittab _PyImport_Inittab[] = {
{"marshal", PyMarshal_Init},
/* This lives it with import.c */
{"imp", PyInit_imp},
{"_imp", PyInit_imp},
/* These entries are here for sys.builtin_module_names */
{"__main__", NULL},

View file

@ -150,7 +150,7 @@ struct _inittab _PyImport_Inittab[] = {
{"marshal", PyMarshal_Init},
/* This lives it with import.c */
{"imp", initimp},
{"_imp", initimp},
/* These entries are here for sys.builtin_module_names */
{"__main__", NULL},

View file

@ -88,7 +88,7 @@ struct _inittab _PyImport_Inittab[] = {
{"marshal", PyMarshal_Init},
/* This lives it with import.c */
{"imp", initimp},
{"_imp", initimp},
/* These entries are here for sys.builtin_module_names */
{"__main__", NULL},