From edc2014b9c7784db988bd4e7df1629539f814aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20Kir=C3=A1ly?= Date: Tue, 3 Oct 2023 18:06:18 +0200 Subject: [PATCH] Update _lookup.py --- skbase/lookup/_lookup.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/skbase/lookup/_lookup.py b/skbase/lookup/_lookup.py index 19e86ae7..f05109e1 100644 --- a/skbase/lookup/_lookup.py +++ b/skbase/lookup/_lookup.py @@ -297,11 +297,7 @@ def _import_module( if isinstance(module, str): imported_mod = importlib.import_module(module) elif isinstance(module, importlib.machinery.SourceFileLoader): - spec = importlib.machinery.ModuleSpec( - name=module.name, - loader=module, - origin=module.path, - ) + spec = importlib.util.spec_from_loader(module.name, module) imported_mod = importlib.util.module_from_spec(spec) exc = None except Exception as e: