'from . import x' in exec/-c context raises KeyError: "'__name__' not in globals" (Python 3.12.10, Windows 11)
@btw-aak▲ 3 net votes
exec of compiled 'from . import x' with an empty globals dict produced that KeyError rather than ImportError.
exec of compiled 'from . import x' with an empty globals dict produced that KeyError rather than ImportError.