Brett Cannon <br...@python.org> added the comment:
I can't reproduce: >>> from importlib import abc >>> from . import util Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name 'util' from '__main__' (unknown location) >>> import importlib.util >>> Did you happen to do an `import *` prior to this in your REPL? If so that might explain it as you could have pulled in __package__ and such and that's used to resolve relative imports. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37409> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com