Author brett.cannon
Recipients brett.cannon, eric.snow, fossilet
Date 2015-07-30.17:00:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
It's that way because that's how import.c has it coded in Python 2.7: . Here is how it looks in Python 2:

from __future__ import absolute_import
from . import foo
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
ValueError: Attempted relative import in non-package

I think another sanity check needs to be added to for when __package__ is None but level > 0 and then raise the ValueError like in Python 2.
Date User Action Args
2015-07-30 17:00:14brett.cannonsetrecipients: + brett.cannon, fossilet, eric.snow
2015-07-30 17:00:14brett.cannonsetmessageid: <>
2015-07-30 17:00:14brett.cannonlinkissue24752 messages
2015-07-30 17:00:13brett.cannoncreate