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 ncoghlan
Recipients brett.cannon, ncoghlan
Date 2011-07-20.23:34:26
SpamBayes Score 1.3776105e-07
Marked as misclassified No
Message-id <1311204866.94.0.868144642715.issue12599@psf.upfronthosting.co.za>
In-reply-to
Content
Problems noted by PJE on import-sig:
====================================
For example, PathFinder's find_module treats an empty path the same as sys.path, and will also fail if for some reason the bool() of a PEP 302 finder or loader object is False.  Also, module_for_loader() will create a new module object, if you have a False module subclass in sys.modules.

...

These distinctions could be more problematic than they appear, as it's possible to inadvertently make your loader or your module subclass capable of being False (for example, if you subclassed a sequence type or implemented a __len__), and this could lead to some very subtle bugs, albeit very rare ones as well.  ;-)
===================================

The import test cases should include some examples of such pathological objects, with importlib then updated appropriately.
History
Date User Action Args
2011-07-20 23:34:26ncoghlansetrecipients: + ncoghlan, brett.cannon
2011-07-20 23:34:26ncoghlansetmessageid: <1311204866.94.0.868144642715.issue12599@psf.upfronthosting.co.za>
2011-07-20 23:34:26ncoghlanlinkissue12599 messages
2011-07-20 23:34:26ncoghlancreate