Author serhiy.storchaka
Recipients brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
Date 2017-07-08.05:07:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za>
In-reply-to
Content
It is possible to get SystemError on import (see attached archive).

$ ./python -c 'import package.module1'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/serhiy/py/cpython/package/module1.py", line 3, in <module>
    from . import module2
SystemError: Parent module 'package' not loaded, cannot perform relative import

SystemError means a programming error in interpreter core or extension. It is comparable to an assert in C code, but without immediate crashing. Since this situation can be provoked by user code, it should be replaced with other exception (KeyError, RuntimeError, ImportError, etc).
History
Date User Action Args
2017-07-08 05:07:16serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, ncoghlan, eric.snow
2017-07-08 05:07:16serhiy.storchakasetmessageid: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za>
2017-07-08 05:07:16serhiy.storchakalinkissue30876 messages
2017-07-08 05:07:15serhiy.storchakacreate