Author serhiy.storchaka
Recipients barry, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka, xiang.zhang
Date 2018-02-24.21:12:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1519506739.05.0.467229070634.issue32932@psf.upfronthosting.co.za>
In-reply-to
Content
I was wondering why the error is not raised by the IMPORT_NAME opcode which predates IMPORT_FROM. It calls _handle_fromlist() from _bootstrap. But in this case the module doesn't have the __path__ attribute and the sanity check was skipped.

I'm wondering if it is enough to add the sanity check in _handle_fromlist() for the case when the module doesn't have the __path__ attribute. The Python code could be simpler than the C code.
History
Date User Action Args
2018-02-24 21:12:19serhiy.storchakasetrecipients: + serhiy.storchaka, barry, brett.cannon, ncoghlan, eric.snow, xiang.zhang
2018-02-24 21:12:19serhiy.storchakasetmessageid: <1519506739.05.0.467229070634.issue32932@psf.upfronthosting.co.za>
2018-02-24 21:12:19serhiy.storchakalinkissue32932 messages
2018-02-24 21:12:19serhiy.storchakacreate