diff --git a/src/protean/domain.py b/src/protean/domain.py index 444319f6..3309b11e 100644 --- a/src/protean/domain.py +++ b/src/protean/domain.py @@ -231,7 +231,6 @@ def init(self): import inspect import os import pathlib - import sys domain_path = inspect.stack()[1][1] dir_name = pathlib.PurePath(pathlib.Path(domain_path).resolve()).parent @@ -260,7 +259,6 @@ def init(self): spec = importlib.util.spec_from_file_location(file_module_name, full_file_path) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) - sys.modules[spec.name] = module logger.debug(f'Loaded {file_module_name}') except ModuleNotFoundError as exc: logger.debug(f'Error while autoloading modules: {exc}')