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 martin.panter
Recipients Anthony.Kong, Fotis.Koutoulakis, berker.peksag, eric.snow, luiz.poleto, martin.panter, ncoghlan, r.david.murray
Date 2015-03-11.08:13:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426061582.32.0.380862106193.issue19771@psf.upfronthosting.co.za>
In-reply-to
Content
Posting a new patch with the following changes:

* Added Poleto’s original tests, updated according to review comments. Combined the flag and source code string parameters.

* Used a different approach to guessing where the offending ImportError came from. Now it checks if the module got added to sys.modules, which seems to work in all cases I tried. It no longer does what the bug title says (check ImportError.name), but I think it is a better workaround or fix for the underlying problem.

* Removed Poleto’s “Error executing package . . .” ImportError wrapper. We already know what package we are trying to execute, and it hasn’t actually been “executed” yet, because __init__.py failed.

* Cleaned up exception name in the “Error while finding spec” message
History
Date User Action Args
2015-03-11 08:13:02martin.pantersetrecipients: + martin.panter, ncoghlan, r.david.murray, eric.snow, Anthony.Kong, berker.peksag, Fotis.Koutoulakis, luiz.poleto
2015-03-11 08:13:02martin.pantersetmessageid: <1426061582.32.0.380862106193.issue19771@psf.upfronthosting.co.za>
2015-03-11 08:13:02martin.panterlinkissue19771 messages
2015-03-11 08:13:02martin.pantercreate