[issue13959] Re-implement parts of imp in pure Python

Brett Cannon report at bugs.python.org
Sun Apr 22 01:02:39 CEST 2012


Brett Cannon <brett at python.org> added the comment:

Time for a recap!

I am personally not bothering with moving imp.get_tag() and imp.get_magic() to importlib._bootstrap as the amount of C code required to support the public C API is not worth it. If someone else once to do the work then by all means attach a patch.

I still need to port imp.find_module() (and the various constants) and will base it off of Eric's code.

NullImporter will get ported once issue #14605 (exposing the import machinery) lands.

get_suffixes() will also get ported, but that is a little bit more involved as I need to change how _DynLoadFiletab works by only storing the file extensions and not the other fluff (which is the same for all OSs).

After all of that is done then I will expose some API in importlib to replace find_module() and load_*() functions and then deprecate them (see issue #14551 for an ongoing discussion the possible API).

----------
assignee:  -> brett.cannon
dependencies: +Make import machinery explicit
stage:  -> needs patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13959>
_______________________________________


More information about the Python-bugs-list mailing list