Brett Cannon added the comment: Forgot that PyImport_ImportFrozenModule() uses PyImport_ImportFrozenModuleObject() and the former is used to load _frozen_importlib, so can't drop the function. The code could still be updated, though, to set __package__ before the code object is executed. That probably wouldn't be too hard to do by factoring out the code in PyImport_ImportModuleLevelObject which calculates the parent there.
---------- assignee: brett.cannon -> priority: normal -> low title: Update PyImport_ImportFrozenModuleObject() to use importlib -> Update PyImport_ImportFrozenModuleObject() to set __package__ _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18114> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com