[issue24752] SystemError when importing from a non-package directory

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24752] SystemError when importing from a non-package directory

2016-01-14 Thread Brett Cannon
Changes by Brett Cannon : -- superseder: -> SystemError: Parent module '' not loaded, cannot perform relative import ___ Python tracker ___

[issue24752] SystemError when importing from a non-package directory

2016-01-14 Thread Chris Angelico
Chris Angelico added the comment: Linking this issue with #18018 - same problem, same situation. -- nosy: +Rosuav ___ Python tracker ___ _

[issue24752] SystemError when importing from a non-package directory

2015-07-30 Thread Brett Cannon
Brett Cannon added the comment: It's that way because that's how import.c has it coded in Python 2.7: https://hg.python.org/cpython/file/309cbbc32491/Python/import.c#l2462 . Here is how it looks in Python 2: %%python2 from __future__ import absolute_import from . import foo ---

[issue24752] SystemError when importing from a non-package directory

2015-07-30 Thread Eric Snow
Eric Snow added the comment: You are correct that SystemError indicates a non-fatal issue in the interpreter and thanks for reporting the matter. In this case I'd say that SystemError is the wrong exception type. I expect that ImportError (or perhaps RuntimeError) is more appropriate. Howev

[issue24752] SystemError when importing from a non-package directory

2015-07-30 Thread R. David Murray
Changes by R. David Murray : -- nosy: +brett.cannon, eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24752] SystemError when importing from a non-package directory

2015-07-29 Thread Yongzhi Pan
New submission from Yongzhi Pan: In an empty dir, e.g. Desktop, the following import raises SystemError: >>> from . import foo Traceback (most recent call last): File "", line 1, in SystemError: Parent module '' not loaded, cannot perform relative import The documentation says that SystemErr