Open matthewdeanmartin opened 5 months ago
I was wrong, the import imp
is also in the main module.
This hack seems to work
if has_imp:
module = imp.load_source(path.splitext(path.basename(args.file))[0], args.file)
else:
from importlib.machinery import SourceFileLoader
module = SourceFileLoader(path.splitext(path.basename(args.file))[0], args.file).load_module()
\navio-builder\navio\builder\tests\test_nb.py:7: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses import imp
I guess it isn't urgent because it is in the tests, but eventually it will be a problem.