[issue19771] runpy should check ImportError.name before wrapping it
R. David Murray
report at bugs.python.org
Mon Apr 21 19:00:20 CEST 2014
R. David Murray added the comment:
Hmm. It seems to me that .name not being set is a bug in importlib. It appears that importlib doesn't set it in the 'from x import y' case. After a bit of experimenting at the python prompt, I'm not even sure what that code in runpy is *doing* (find_spec('foo.__main__') seems to return None if __main__ doesn't exist but foo does). I'm going to have to leave this to Nick unless I find some more time somewhere ;)
----------
nosy: +r.david.murray
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19771>
_______________________________________
More information about the Python-bugs-list
mailing list