Author brett.cannon
Recipients Ben Lewis2, brett.cannon, eric.smith, serhiy.storchaka
Date 2019-06-28.19:34:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
If you run with `-Xdev`/warnings turned on you get an idea of what's happening:

>>> builtins.__import__('', globals(), locals(), ('foo',), 1)
<stdin>:1: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
<module '__main__' (built-in)>

The check is being done in resolve_name() in import.c ( My guess is there's an off-by-one error in the sanity check logic for attempting a relative import beyond the top-level package.
Date User Action Args
2019-06-28 19:34:59brett.cannonsetrecipients: + brett.cannon, eric.smith, serhiy.storchaka, Ben Lewis2
2019-06-28 19:34:59brett.cannonsetmessageid: <>
2019-06-28 19:34:59brett.cannonlinkissue37409 messages
2019-06-28 19:34:59brett.cannoncreate