Apipkg.initpkg should preserve the __spec__ attribute of the original module. This attribute is used by importlib, and in Python 3.7 importlib.util.find_spec('name') will fail when 'name' is already in sys.modules and doesn't have an attribute named __spec__
Apipkg.initpkg should preserve the
__spec__
attribute of the original module. This attribute is used by importlib, and in Python 3.7importlib.util.find_spec('name')
will fail when 'name' is already in sys.modules and doesn't have an attribute named__spec__
See also https://bugs.python.org/issue35791