[issue14605] Make import machinery explicit

Brett Cannon report at bugs.python.org
Thu Apr 26 02:58:39 CEST 2012


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

Just to document why my explicit sys.path_hooks patch didn't quite change the meaning of None in sys.path_importer_cache, I found a bunch of places in the stdlib and in Modules/main.c where NullImporter is explicitly expected to be returned, so I wanted to get this initial patch in before I saw what would happen if None didn't change its meaning.

I think I will try a patch to have None mean "no finder" instead of the current "retry sys.path_hooks" and see how that goes. The real trick is whether stopping the use of NullImporter will be easy or not. That will be what really decides if it stops being on sys.path_hooks by default.

----------

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


More information about the Python-bugs-list mailing list