Closed NarineM closed 4 months ago
Not able to repro on python 3.6, Can run import imp on python 3.4 as well as with python 3.6. Putting this change on hold (not needed). The module was replacedwith importlib but it is still present in 3.4/3.6. We ll need to revisit this code to take this fix in the future if it is removed from newer versions of python
This isn't enough https://docs.python.org/dev/whatsnew/3.12.html#imp
on line 54 you also need to do this
import importlib.util import importlib.machinery
def load_source(modname, filename): loader = importlib.machinery.SourceFileLoader(modname, filename) spec = importlib.util.spec_from_file_location(modname, filename, loader=loader) module = importlib.util.module_from_spec(spec)
# Uncomment the following line to cache the module.
# sys.modules[module.__name__] = module
loader.exec_module(module)
return module
Based on https://docs.python.org/3.6/library/imp.html imp has been deprecated starting python version 3.4