New submission from Serhiy Storchaka: 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). ---------- components: Interpreter Core files: import-systemerror.zip messages: 297940 nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: SystemError on import type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46997/import-systemerror.zip _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30876> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com