[issue30876] SystemError on importing module from unloaded package

Serhiy Storchaka report at bugs.python.org
Sun Jul 9 10:25:08 EDT 2017


Serhiy Storchaka added the comment:

It is easy to replace the SystemError with a recursive import of the missing parent package. It is enough to remove raising the SystemError.

The other effect of this change is that relative import from the top-level module now raises ImportError "attempted relative import with no known parent package" instead of SystemError "Parent module '' not loaded, cannot perform relative import".

----------
stage:  -> patch review

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30876>
_______________________________________


More information about the Python-bugs-list mailing list