This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barry
Recipients barry, brett.cannon, eric.smith, ncoghlan
Date 2012-07-27.18:36:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343414217.14.0.255366402583.issue15473@psf.upfronthosting.co.za>
In-reply-to
Content
I think this is mostly just out of date documentation, but I want to get Brett's feedback.  The sys module has this to say about sys.path_importer_cache:

"A dictionary acting as a cache for finder objects. The keys are paths that have been passed to sys.path_hooks and the values are the finders that are found. If a path is a valid file system path but no explicit finder is found on sys.path_hooks then None is stored to represent the implicit default finder should be used. If the path is not an existing path then imp.NullImporter is set."

Notice that last sentence.  AFAICT, this is not true in importlib.  I can find no relevant reference to imp.NullImporter in _bootstrap.py.  Maybe we should just remove this from the documentation?  OTOH, there are a few tests that check semantics related to imp.NullImporter found in sys.path_importer_cache, so clearly there are API constraints.  See also runpy.py, which gives some semantics to finding this importer in the cache.

Any suggestions for better wording about imp.NullImporter and sys.path_importer_cache?  I'd like to add this to my rewritten import machinery docs, but I'm not exactly sure what to say about it.
History
Date User Action Args
2012-07-27 18:36:57barrysetrecipients: + barry, brett.cannon, ncoghlan, eric.smith
2012-07-27 18:36:57barrysetmessageid: <1343414217.14.0.255366402583.issue15473@psf.upfronthosting.co.za>
2012-07-27 18:36:56barrylinkissue15473 messages
2012-07-27 18:36:56barrycreate