Author Ben Lewis2
Recipients Ben Lewis2
Date 2019-06-26.09:11:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
>>> from curses import ascii
>>> from . import ascii

The second line should raise an ImportError but instead succeeds (tested cpython 3.6.7, 3.7.0 and 3.7.3, and from interactive interpreter and scripts). Specifically, builtins.__import__ does not reproduce the behaviour of importlib._bootstrap.__import__; maybe ceval.c:import_from is neglecting to check that there are parent packages when attempting a relative import?

More details here:
Date User Action Args
2019-06-26 09:11:26Ben Lewis2setrecipients: + Ben Lewis2
2019-06-26 09:11:26Ben Lewis2setmessageid: <>
2019-06-26 09:11:26Ben Lewis2linkissue37409 messages
2019-06-26 09:11:26Ben Lewis2create