[issue37409] relative import_from without parent

2019-06-26 Thread Brett Cannon
Brett Cannon added the comment: I can't reproduce: >>> from importlib import abc >>> from . import util Traceback (most recent call last): File "", line 1, in ImportError: cannot import name 'util' from '__main__' (unknown location) >>> import importlib.util >>> Did you happen to do an `im

[issue37409] relative import_from without parent

2019-06-26 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +brett.cannon, eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37409] relative import_from without parent

2019-06-26 Thread Ben Lewis
New submission from Ben Lewis : >>> 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