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 eric.araujo
Recipients alex, brett.cannon, eric.araujo, eric.snow
Date 2014-03-13.09:17:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1394702235.76.0.953616531326.issue19257@psf.upfronthosting.co.za>
In-reply-to
Content
Fix is simple:

--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -1519,7 +1519,7 @@ def _find_and_load_unlocked(name, import
             path = parent_module.__path__
         except AttributeError:
             msg = (_ERR_MSG + '; {} is not a package').format(name, parent)
-            raise ImportError(msg, name=name)
+            raise ImportError(msg, name=name) from None

Manual testing confirms the fix.  Is a unit test needed?  Should this wait for 3.5?
History
Date User Action Args
2014-03-13 09:17:15eric.araujosetrecipients: + eric.araujo, brett.cannon, alex, eric.snow
2014-03-13 09:17:15eric.araujosetmessageid: <1394702235.76.0.953616531326.issue19257@psf.upfronthosting.co.za>
2014-03-13 09:17:15eric.araujolinkissue19257 messages
2014-03-13 09:17:15eric.araujocreate