Eric Snow added the comment:

Perhaps this should be split into two issues, as the fix will likely be 
different for the two.

For the first part (SyntaxError), my initial impression is that this will 
require a similar fix, or extension of it, to the one in issue15110.  That fix 
was limited just to the execution of the module, while this problem happens 
earlier (during the compilation step in SourceLoader.get_code()).  

For the second part, it is all about failures during the execution of an import 
that was initiated during the import of another module.  That traceback is 
definitely less than helpful.  A better traceback would is doable.

For both (and maybe for issue15110) we should explore using exception chaining 
to separate the import portion from the rest.  I see about working on a patch 
later this evening.

----------
nosy: +eric.snow

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15425>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to