diff --git a/src/rougail/tiramisureflector.py b/src/rougail/tiramisureflector.py index 36463ce42..85fa2bd49 100644 --- a/src/rougail/tiramisureflector.py +++ b/src/rougail/tiramisureflector.py @@ -26,7 +26,11 @@ class TiramisuReflector: ): self.index = 0 self.text = ["from importlib.machinery import SourceFileLoader", - f"func = SourceFileLoader('func', '{funcs_path}').load_module()", + "from importlib.util import spec_from_loader, module_from_spec", + f"loader = SourceFileLoader('func', '{funcs_path}')", + "spec = spec_from_loader(loader.name, loader)", + "func = module_from_spec(spec)", + "loader.exec_module(func)", "for key, value in dict(locals()).items():", " if key != ['SourceFileLoader', 'func']:", " setattr(func, key, value)", diff --git a/tests/dictionaries/00empty/tiramisu/base.py b/tests/dictionaries/00empty/tiramisu/base.py index 2194ab466..d8001d59d 100644 --- a/tests/dictionaries/00empty/tiramisu/base.py +++ b/tests/dictionaries/00empty/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/00load_autofreeze/tiramisu/base.py b/tests/dictionaries/00load_autofreeze/tiramisu/base.py index 8e2f715bc..a43499a1e 100644 --- a/tests/dictionaries/00load_autofreeze/tiramisu/base.py +++ b/tests/dictionaries/00load_autofreeze/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py b/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py index f01b4ad9b..be2333b73 100644 --- a/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py +++ b/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/00load_autosave/tiramisu/base.py b/tests/dictionaries/00load_autosave/tiramisu/base.py index fd39dd727..310314893 100644 --- a/tests/dictionaries/00load_autosave/tiramisu/base.py +++ b/tests/dictionaries/00load_autosave/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py b/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py index 0e5f43a98..700ba1065 100644 --- a/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py +++ b/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/00load_comment/tiramisu/base.py b/tests/dictionaries/00load_comment/tiramisu/base.py index e7b834cb6..939aa6b05 100644 --- a/tests/dictionaries/00load_comment/tiramisu/base.py +++ b/tests/dictionaries/00load_comment/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/00load_notype/tiramisu/base.py b/tests/dictionaries/00load_notype/tiramisu/base.py index 726c54fb0..36bd6bcc3 100644 --- a/tests/dictionaries/00load_notype/tiramisu/base.py +++ b/tests/dictionaries/00load_notype/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/00load_save/tiramisu/base.py b/tests/dictionaries/00load_save/tiramisu/base.py index e7b834cb6..939aa6b05 100644 --- a/tests/dictionaries/00load_save/tiramisu/base.py +++ b/tests/dictionaries/00load_save/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/00load_subfolder/tiramisu/base.py b/tests/dictionaries/00load_subfolder/tiramisu/base.py index bfcc5b5cd..bf5a94455 100644 --- a/tests/dictionaries/00load_subfolder/tiramisu/base.py +++ b/tests/dictionaries/00load_subfolder/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01auto_autofreeze/tiramisu/base.py b/tests/dictionaries/01auto_autofreeze/tiramisu/base.py index 6ad348a17..11c18273e 100644 --- a/tests/dictionaries/01auto_autofreeze/tiramisu/base.py +++ b/tests/dictionaries/01auto_autofreeze/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01auto_base/tiramisu/base.py b/tests/dictionaries/01auto_base/tiramisu/base.py index d36b69599..6c8d2ef8c 100644 --- a/tests/dictionaries/01auto_base/tiramisu/base.py +++ b/tests/dictionaries/01auto_base/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01auto_withoutparam/tiramisu/base.py b/tests/dictionaries/01auto_withoutparam/tiramisu/base.py index d942b2b80..2d844fa32 100644 --- a/tests/dictionaries/01auto_withoutparam/tiramisu/base.py +++ b/tests/dictionaries/01auto_withoutparam/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01base_file_include/tiramisu/base.py b/tests/dictionaries/01base_file_include/tiramisu/base.py index 628de877c..136429def 100644 --- a/tests/dictionaries/01base_file_include/tiramisu/base.py +++ b/tests/dictionaries/01base_file_include/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01base_file_patch/tiramisu/base.py b/tests/dictionaries/01base_file_patch/tiramisu/base.py index 628de877c..136429def 100644 --- a/tests/dictionaries/01base_file_patch/tiramisu/base.py +++ b/tests/dictionaries/01base_file_patch/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01base_file_utfchar/tiramisu/base.py b/tests/dictionaries/01base_file_utfchar/tiramisu/base.py index 90876d528..ba08472bb 100644 --- a/tests/dictionaries/01base_file_utfchar/tiramisu/base.py +++ b/tests/dictionaries/01base_file_utfchar/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01base_float/tiramisu/base.py b/tests/dictionaries/01base_float/tiramisu/base.py index ed3aa549c..cd608a09c 100644 --- a/tests/dictionaries/01base_float/tiramisu/base.py +++ b/tests/dictionaries/01base_float/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01base_multi/tiramisu/base.py b/tests/dictionaries/01base_multi/tiramisu/base.py index 2a2492071..e909a4e41 100644 --- a/tests/dictionaries/01base_multi/tiramisu/base.py +++ b/tests/dictionaries/01base_multi/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01base_var_name_same_family/tiramisu/base.py b/tests/dictionaries/01base_var_name_same_family/tiramisu/base.py index 8aca1556c..a6e453191 100644 --- a/tests/dictionaries/01base_var_name_same_family/tiramisu/base.py +++ b/tests/dictionaries/01base_var_name_same_family/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01fill_autofreeze/tiramisu/base.py b/tests/dictionaries/01fill_autofreeze/tiramisu/base.py index ff5f541dc..edec3c728 100644 --- a/tests/dictionaries/01fill_autofreeze/tiramisu/base.py +++ b/tests/dictionaries/01fill_autofreeze/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01fill_autosave/tiramisu/base.py b/tests/dictionaries/01fill_autosave/tiramisu/base.py index 16d73b797..ac16166f9 100644 --- a/tests/dictionaries/01fill_autosave/tiramisu/base.py +++ b/tests/dictionaries/01fill_autosave/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01fill_base/tiramisu/base.py b/tests/dictionaries/01fill_base/tiramisu/base.py index bbe991a51..bfc778c62 100644 --- a/tests/dictionaries/01fill_base/tiramisu/base.py +++ b/tests/dictionaries/01fill_base/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01fill_baseaccent/tiramisu/base.py b/tests/dictionaries/01fill_baseaccent/tiramisu/base.py index 762c5d9d1..27de1b946 100644 --- a/tests/dictionaries/01fill_baseaccent/tiramisu/base.py +++ b/tests/dictionaries/01fill_baseaccent/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01fill_mandatory/tiramisu/base.py b/tests/dictionaries/01fill_mandatory/tiramisu/base.py index ac09f2776..3731e2cee 100644 --- a/tests/dictionaries/01fill_mandatory/tiramisu/base.py +++ b/tests/dictionaries/01fill_mandatory/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01fill_number/tiramisu/base.py b/tests/dictionaries/01fill_number/tiramisu/base.py index 444be023c..97dce73e1 100644 --- a/tests/dictionaries/01fill_number/tiramisu/base.py +++ b/tests/dictionaries/01fill_number/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01fill_only_optional/tiramisu/base.py b/tests/dictionaries/01fill_only_optional/tiramisu/base.py index d942b2b80..2d844fa32 100644 --- a/tests/dictionaries/01fill_only_optional/tiramisu/base.py +++ b/tests/dictionaries/01fill_only_optional/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01fill_optional/tiramisu/base.py b/tests/dictionaries/01fill_optional/tiramisu/base.py index d36b69599..6c8d2ef8c 100644 --- a/tests/dictionaries/01fill_optional/tiramisu/base.py +++ b/tests/dictionaries/01fill_optional/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/01hidden_if_in_autofreeze/tiramisu/base.py b/tests/dictionaries/01hidden_if_in_autofreeze/tiramisu/base.py index 976634b90..4feb658f1 100644 --- a/tests/dictionaries/01hidden_if_in_autofreeze/tiramisu/base.py +++ b/tests/dictionaries/01hidden_if_in_autofreeze/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/02autosave_hidden_frozenifin/tiramisu/base.py b/tests/dictionaries/02autosave_hidden_frozenifin/tiramisu/base.py index dc69eaf35..ea799f770 100644 --- a/tests/dictionaries/02autosave_hidden_frozenifin/tiramisu/base.py +++ b/tests/dictionaries/02autosave_hidden_frozenifin/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10autosave_hidden/tiramisu/base.py b/tests/dictionaries/10autosave_hidden/tiramisu/base.py index 198870e22..a30c5afef 100644 --- a/tests/dictionaries/10autosave_hidden/tiramisu/base.py +++ b/tests/dictionaries/10autosave_hidden/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10check_base/tiramisu/base.py b/tests/dictionaries/10check_base/tiramisu/base.py index 3ce7da46e..b66fbdb34 100644 --- a/tests/dictionaries/10check_base/tiramisu/base.py +++ b/tests/dictionaries/10check_base/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10check_no_param/tiramisu/base.py b/tests/dictionaries/10check_no_param/tiramisu/base.py index 53015e37b..6354055a9 100644 --- a/tests/dictionaries/10check_no_param/tiramisu/base.py +++ b/tests/dictionaries/10check_no_param/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10check_option/tiramisu/base.py b/tests/dictionaries/10check_option/tiramisu/base.py index cdb10cb74..4403de452 100644 --- a/tests/dictionaries/10check_option/tiramisu/base.py +++ b/tests/dictionaries/10check_option/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10check_optional/tiramisu/base.py b/tests/dictionaries/10check_optional/tiramisu/base.py index 6294b7cdb..5bf097006 100644 --- a/tests/dictionaries/10check_optional/tiramisu/base.py +++ b/tests/dictionaries/10check_optional/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10check_valid_differ/tiramisu/base.py b/tests/dictionaries/10check_valid_differ/tiramisu/base.py index c3c89baa1..03d739bbb 100644 --- a/tests/dictionaries/10check_valid_differ/tiramisu/base.py +++ b/tests/dictionaries/10check_valid_differ/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10check_valid_differ_add/tiramisu/base.py b/tests/dictionaries/10check_valid_differ_add/tiramisu/base.py index 3d6f35b16..85430ac9f 100644 --- a/tests/dictionaries/10check_valid_differ_add/tiramisu/base.py +++ b/tests/dictionaries/10check_valid_differ_add/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10check_valid_differ_removecheck/tiramisu/base.py b/tests/dictionaries/10check_valid_differ_removecheck/tiramisu/base.py index 6a7fa3ea3..31f6e9c4b 100644 --- a/tests/dictionaries/10check_valid_differ_removecheck/tiramisu/base.py +++ b/tests/dictionaries/10check_valid_differ_removecheck/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10check_valid_in_network/tiramisu/base.py b/tests/dictionaries/10check_valid_in_network/tiramisu/base.py index 416e8569a..13a3285a4 100644 --- a/tests/dictionaries/10check_valid_in_network/tiramisu/base.py +++ b/tests/dictionaries/10check_valid_in_network/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10check_valid_in_network_cidr/tiramisu/base.py b/tests/dictionaries/10check_valid_in_network_cidr/tiramisu/base.py index e58c6c831..8eea3de16 100644 --- a/tests/dictionaries/10check_valid_in_network_cidr/tiramisu/base.py +++ b/tests/dictionaries/10check_valid_in_network_cidr/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10check_valid_ipnetmask/tiramisu/base.py b/tests/dictionaries/10check_valid_ipnetmask/tiramisu/base.py index 2e8486b5d..9bbcd8ab7 100644 --- a/tests/dictionaries/10check_valid_ipnetmask/tiramisu/base.py +++ b/tests/dictionaries/10check_valid_ipnetmask/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10fill_information/tiramisu/base.py b/tests/dictionaries/10fill_information/tiramisu/base.py index fc27b03c3..a75451765 100644 --- a/tests/dictionaries/10fill_information/tiramisu/base.py +++ b/tests/dictionaries/10fill_information/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_append/tiramisu/base.py b/tests/dictionaries/10leadership_append/tiramisu/base.py index 1334c8b24..774599cec 100644 --- a/tests/dictionaries/10leadership_append/tiramisu/base.py +++ b/tests/dictionaries/10leadership_append/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_append_hidden/tiramisu/base.py b/tests/dictionaries/10leadership_append_hidden/tiramisu/base.py index 590f41a1c..68b08590c 100644 --- a/tests/dictionaries/10leadership_append_hidden/tiramisu/base.py +++ b/tests/dictionaries/10leadership_append_hidden/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_append_name/tiramisu/base.py b/tests/dictionaries/10leadership_append_name/tiramisu/base.py index f8e73ada8..70756133f 100644 --- a/tests/dictionaries/10leadership_append_name/tiramisu/base.py +++ b/tests/dictionaries/10leadership_append_name/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_auto/tiramisu/base.py b/tests/dictionaries/10leadership_auto/tiramisu/base.py index 9d3a32018..6cb92c04d 100644 --- a/tests/dictionaries/10leadership_auto/tiramisu/base.py +++ b/tests/dictionaries/10leadership_auto/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_autoleader/tiramisu/base.py b/tests/dictionaries/10leadership_autoleader/tiramisu/base.py index 418953cf1..7632b7df8 100644 --- a/tests/dictionaries/10leadership_autoleader/tiramisu/base.py +++ b/tests/dictionaries/10leadership_autoleader/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_autoleader_expert/tiramisu/base.py b/tests/dictionaries/10leadership_autoleader_expert/tiramisu/base.py index c294461a2..f9adb01c3 100644 --- a/tests/dictionaries/10leadership_autoleader_expert/tiramisu/base.py +++ b/tests/dictionaries/10leadership_autoleader_expert/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_autosaveexpert/tiramisu/base.py b/tests/dictionaries/10leadership_autosaveexpert/tiramisu/base.py index 489171396..006d58680 100644 --- a/tests/dictionaries/10leadership_autosaveexpert/tiramisu/base.py +++ b/tests/dictionaries/10leadership_autosaveexpert/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_familyaccent/tiramisu/base.py b/tests/dictionaries/10leadership_familyaccent/tiramisu/base.py index c39cd5341..7ca1452e1 100644 --- a/tests/dictionaries/10leadership_familyaccent/tiramisu/base.py +++ b/tests/dictionaries/10leadership_familyaccent/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_leader_hidden/tiramisu/base.py b/tests/dictionaries/10leadership_leader_hidden/tiramisu/base.py index 4001f9217..0fd8bb0f8 100644 --- a/tests/dictionaries/10leadership_leader_hidden/tiramisu/base.py +++ b/tests/dictionaries/10leadership_leader_hidden/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_leader_hidden_if_in/tiramisu/base.py b/tests/dictionaries/10leadership_leader_hidden_if_in/tiramisu/base.py index 2605269fa..b2d347b6a 100644 --- a/tests/dictionaries/10leadership_leader_hidden_if_in/tiramisu/base.py +++ b/tests/dictionaries/10leadership_leader_hidden_if_in/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_leader_hidden_if_in_name/tiramisu/base.py b/tests/dictionaries/10leadership_leader_hidden_if_in_name/tiramisu/base.py index 9c7565f41..da7426292 100644 --- a/tests/dictionaries/10leadership_leader_hidden_if_in_name/tiramisu/base.py +++ b/tests/dictionaries/10leadership_leader_hidden_if_in_name/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_leadermandatory/tiramisu/base.py b/tests/dictionaries/10leadership_leadermandatory/tiramisu/base.py index e60ade11e..6f1feb375 100644 --- a/tests/dictionaries/10leadership_leadermandatory/tiramisu/base.py +++ b/tests/dictionaries/10leadership_leadermandatory/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_mandatory/tiramisu/base.py b/tests/dictionaries/10leadership_mandatory/tiramisu/base.py index fe23eac73..8c21d599e 100644 --- a/tests/dictionaries/10leadership_mandatory/tiramisu/base.py +++ b/tests/dictionaries/10leadership_mandatory/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_mandatoryfollower/tiramisu/base.py b/tests/dictionaries/10leadership_mandatoryfollower/tiramisu/base.py index 7f3e48f54..3e0855518 100644 --- a/tests/dictionaries/10leadership_mandatoryfollower/tiramisu/base.py +++ b/tests/dictionaries/10leadership_mandatoryfollower/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10leadership_multi/tiramisu/base.py b/tests/dictionaries/10leadership_multi/tiramisu/base.py index f7124d365..159834f88 100644 --- a/tests/dictionaries/10leadership_multi/tiramisu/base.py +++ b/tests/dictionaries/10leadership_multi/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_disabled_if_in/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_in/tiramisu/base.py index c59270395..ca0b36b93 100644 --- a/tests/dictionaries/10load_disabled_if_in/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_in/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_disabled_if_in_none/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_in_none/tiramisu/base.py index 7467e507a..170a355f3 100644 --- a/tests/dictionaries/10load_disabled_if_in_none/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_in_none/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_disabled_if_inaccent_family/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_inaccent_family/tiramisu/base.py index 7cf34bf67..9efe2e5c8 100644 --- a/tests/dictionaries/10load_disabled_if_inaccent_family/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_inaccent_family/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py index bacd70aef..9688b180e 100644 --- a/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_disabled_if_not_in_fallback_force/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_not_in_fallback_force/tiramisu/base.py index bacd70aef..9688b180e 100644 --- a/tests/dictionaries/10load_disabled_if_not_in_fallback_force/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_not_in_fallback_force/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_disabledifin_fallback/tiramisu/base.py b/tests/dictionaries/10load_disabledifin_fallback/tiramisu/base.py index 9fed251c7..5f497aefc 100644 --- a/tests/dictionaries/10load_disabledifin_fallback/tiramisu/base.py +++ b/tests/dictionaries/10load_disabledifin_fallback/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_disabledifin_fallback_force/tiramisu/base.py b/tests/dictionaries/10load_disabledifin_fallback_force/tiramisu/base.py index a3a21d872..fe61de698 100644 --- a/tests/dictionaries/10load_disabledifin_fallback_force/tiramisu/base.py +++ b/tests/dictionaries/10load_disabledifin_fallback_force/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_disabledifin_whithouttype/tiramisu/base.py b/tests/dictionaries/10load_disabledifin_whithouttype/tiramisu/base.py index a3a21d872..fe61de698 100644 --- a/tests/dictionaries/10load_disabledifin_whithouttype/tiramisu/base.py +++ b/tests/dictionaries/10load_disabledifin_whithouttype/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_emptyvalue/tiramisu/base.py b/tests/dictionaries/10load_emptyvalue/tiramisu/base.py index fe8d2f29f..5462a2076 100644 --- a/tests/dictionaries/10load_emptyvalue/tiramisu/base.py +++ b/tests/dictionaries/10load_emptyvalue/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_frozenifin/tiramisu/base.py b/tests/dictionaries/10load_frozenifin/tiramisu/base.py index 485dd25e6..fbc46ae07 100644 --- a/tests/dictionaries/10load_frozenifin/tiramisu/base.py +++ b/tests/dictionaries/10load_frozenifin/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_frozenifin_auto/tiramisu/base.py b/tests/dictionaries/10load_frozenifin_auto/tiramisu/base.py index 2aa84e975..1c6d8117d 100644 --- a/tests/dictionaries/10load_frozenifin_auto/tiramisu/base.py +++ b/tests/dictionaries/10load_frozenifin_auto/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_frozenifin_multiparam/tiramisu/base.py b/tests/dictionaries/10load_frozenifin_multiparam/tiramisu/base.py index c298f265e..38e52f55e 100644 --- a/tests/dictionaries/10load_frozenifin_multiparam/tiramisu/base.py +++ b/tests/dictionaries/10load_frozenifin_multiparam/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_frozenifin_noexist/tiramisu/base.py b/tests/dictionaries/10load_frozenifin_noexist/tiramisu/base.py index 005932963..1792cb356 100644 --- a/tests/dictionaries/10load_frozenifin_noexist/tiramisu/base.py +++ b/tests/dictionaries/10load_frozenifin_noexist/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_frozenifnotin/tiramisu/base.py b/tests/dictionaries/10load_frozenifnotin/tiramisu/base.py index 563886a51..f26ef55b2 100644 --- a/tests/dictionaries/10load_frozenifnotin/tiramisu/base.py +++ b/tests/dictionaries/10load_frozenifnotin/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_frozenifnotin_noexist/tiramisu/base.py b/tests/dictionaries/10load_frozenifnotin_noexist/tiramisu/base.py index 005932963..1792cb356 100644 --- a/tests/dictionaries/10load_frozenifnotin_noexist/tiramisu/base.py +++ b/tests/dictionaries/10load_frozenifnotin_noexist/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_hidden_if_family/tiramisu/base.py b/tests/dictionaries/10load_hidden_if_family/tiramisu/base.py index 078ede41a..90950aa33 100644 --- a/tests/dictionaries/10load_hidden_if_family/tiramisu/base.py +++ b/tests/dictionaries/10load_hidden_if_family/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_leadership/tiramisu/base.py b/tests/dictionaries/10load_leadership/tiramisu/base.py index e6141a0cb..e75501708 100644 --- a/tests/dictionaries/10load_leadership/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_leadership_default_multi/tiramisu/base.py b/tests/dictionaries/10load_leadership_default_multi/tiramisu/base.py index 092d25a32..84f564caa 100644 --- a/tests/dictionaries/10load_leadership_default_multi/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_default_multi/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_leadership_default_submulti/tiramisu/base.py b/tests/dictionaries/10load_leadership_default_submulti/tiramisu/base.py index 619a4f357..1d4fb5ba8 100644 --- a/tests/dictionaries/10load_leadership_default_submulti/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_default_submulti/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_leadership_defaultmulti_leader/tiramisu/base.py b/tests/dictionaries/10load_leadership_defaultmulti_leader/tiramisu/base.py index 47d7f4e8f..d10616200 100644 --- a/tests/dictionaries/10load_leadership_defaultmulti_leader/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_defaultmulti_leader/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_leadership_description/tiramisu/base.py b/tests/dictionaries/10load_leadership_description/tiramisu/base.py index a84c150d9..d243213fa 100644 --- a/tests/dictionaries/10load_leadership_description/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_description/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_leadership_name/tiramisu/base.py b/tests/dictionaries/10load_leadership_name/tiramisu/base.py index a8120ab97..66d837fb4 100644 --- a/tests/dictionaries/10load_leadership_name/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_name/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_leadership_normalize_family/tiramisu/base.py b/tests/dictionaries/10load_leadership_normalize_family/tiramisu/base.py index 98f8bdaa3..bbd35582a 100644 --- a/tests/dictionaries/10load_leadership_normalize_family/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_normalize_family/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_leadership_submulti/tiramisu/base.py b/tests/dictionaries/10load_leadership_submulti/tiramisu/base.py index 408f2012d..6c66ab72f 100644 --- a/tests/dictionaries/10load_leadership_submulti/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_submulti/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_mandatoryifin/tiramisu/base.py b/tests/dictionaries/10load_mandatoryifin/tiramisu/base.py index 0d7b7476d..e3817b583 100644 --- a/tests/dictionaries/10load_mandatoryifin/tiramisu/base.py +++ b/tests/dictionaries/10load_mandatoryifin/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_mandatoryifnotin_noexist/tiramisu/base.py b/tests/dictionaries/10load_mandatoryifnotin_noexist/tiramisu/base.py index 005932963..1792cb356 100644 --- a/tests/dictionaries/10load_mandatoryifnotin_noexist/tiramisu/base.py +++ b/tests/dictionaries/10load_mandatoryifnotin_noexist/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10load_multivalue/tiramisu/base.py b/tests/dictionaries/10load_multivalue/tiramisu/base.py index 39f33be00..68c47d775 100644 --- a/tests/dictionaries/10load_multivalue/tiramisu/base.py +++ b/tests/dictionaries/10load_multivalue/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_accent/tiramisu/base.py b/tests/dictionaries/10valid_enum_accent/tiramisu/base.py index 3d00b799c..359143e9c 100644 --- a/tests/dictionaries/10valid_enum_accent/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_accent/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_base/tiramisu/base.py b/tests/dictionaries/10valid_enum_base/tiramisu/base.py index 8981b31d6..79ec2719b 100644 --- a/tests/dictionaries/10valid_enum_base/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_base/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_base_redefine/tiramisu/base.py b/tests/dictionaries/10valid_enum_base_redefine/tiramisu/base.py index 44d63c454..2fd2f9263 100644 --- a/tests/dictionaries/10valid_enum_base_redefine/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_base_redefine/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_leader/tiramisu/base.py b/tests/dictionaries/10valid_enum_leader/tiramisu/base.py index 5b8a6697d..2efbc1ff0 100644 --- a/tests/dictionaries/10valid_enum_leader/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_leader/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_mandatory/tiramisu/base.py b/tests/dictionaries/10valid_enum_mandatory/tiramisu/base.py index 056294aaa..c8c5bb0dc 100644 --- a/tests/dictionaries/10valid_enum_mandatory/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_mandatory/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_multi/tiramisu/base.py b/tests/dictionaries/10valid_enum_multi/tiramisu/base.py index ee312f11f..fd8ef49e5 100644 --- a/tests/dictionaries/10valid_enum_multi/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_multi/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_none/tiramisu/base.py b/tests/dictionaries/10valid_enum_none/tiramisu/base.py index 698967e50..183c9827b 100644 --- a/tests/dictionaries/10valid_enum_none/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_none/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_number/tiramisu/base.py b/tests/dictionaries/10valid_enum_number/tiramisu/base.py index 9b1c5419b..b996b0a9b 100644 --- a/tests/dictionaries/10valid_enum_number/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_number/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_numberdefault/tiramisu/base.py b/tests/dictionaries/10valid_enum_numberdefault/tiramisu/base.py index 87be164da..e333e01ed 100644 --- a/tests/dictionaries/10valid_enum_numberdefault/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_numberdefault/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_param_empty/tiramisu/base.py b/tests/dictionaries/10valid_enum_param_empty/tiramisu/base.py index b0e21c8f8..a8186ebbf 100644 --- a/tests/dictionaries/10valid_enum_param_empty/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_param_empty/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_param_empty2/tiramisu/base.py b/tests/dictionaries/10valid_enum_param_empty2/tiramisu/base.py index b0e21c8f8..a8186ebbf 100644 --- a/tests/dictionaries/10valid_enum_param_empty2/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_param_empty2/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/10valid_enum_value/tiramisu/base.py b/tests/dictionaries/10valid_enum_value/tiramisu/base.py index 765a38f2b..9c3983fef 100644 --- a/tests/dictionaries/10valid_enum_value/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_value/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py index dc4c5e926..207f84fb4 100644 --- a/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py index ea0bb5a09..e69dc398d 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py index e0ea588a1..a7ef47106 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py b/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py index 3678828a0..7f6073ed3 100644 --- a/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py +++ b/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py index 3678828a0..7f6073ed3 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py index 740c2fd80..874cfb507 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py index b13824b95..c302c722c 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py b/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py index a842020fe..9f6504216 100644 --- a/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py +++ b/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/11valid_enum_variable/tiramisu/base.py b/tests/dictionaries/11valid_enum_variable/tiramisu/base.py index 2d839033e..5450840ec 100644 --- a/tests/dictionaries/11valid_enum_variable/tiramisu/base.py +++ b/tests/dictionaries/11valid_enum_variable/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20family_append/tiramisu/base.py b/tests/dictionaries/20family_append/tiramisu/base.py index 5a2344e03..df52d7ede 100644 --- a/tests/dictionaries/20family_append/tiramisu/base.py +++ b/tests/dictionaries/20family_append/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20family_appendaccent/tiramisu/base.py b/tests/dictionaries/20family_appendaccent/tiramisu/base.py index 66a628740..5c3935a68 100644 --- a/tests/dictionaries/20family_appendaccent/tiramisu/base.py +++ b/tests/dictionaries/20family_appendaccent/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20family_dynamic/tiramisu/base.py b/tests/dictionaries/20family_dynamic/tiramisu/base.py index fae4b10e1..3a5019275 100644 --- a/tests/dictionaries/20family_dynamic/tiramisu/base.py +++ b/tests/dictionaries/20family_dynamic/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20family_dynamic_calc/tiramisu/base.py b/tests/dictionaries/20family_dynamic_calc/tiramisu/base.py index 97a2c3971..fa37f4441 100644 --- a/tests/dictionaries/20family_dynamic_calc/tiramisu/base.py +++ b/tests/dictionaries/20family_dynamic_calc/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20family_dynamic_calc2/tiramisu/base.py b/tests/dictionaries/20family_dynamic_calc2/tiramisu/base.py index b834b573b..8909481ce 100644 --- a/tests/dictionaries/20family_dynamic_calc2/tiramisu/base.py +++ b/tests/dictionaries/20family_dynamic_calc2/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20family_dynamic_calc_suffix/tiramisu/base.py b/tests/dictionaries/20family_dynamic_calc_suffix/tiramisu/base.py index f4cb9beb4..61ed3bcd7 100644 --- a/tests/dictionaries/20family_dynamic_calc_suffix/tiramisu/base.py +++ b/tests/dictionaries/20family_dynamic_calc_suffix/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20family_dynamic_number/tiramisu/base.py b/tests/dictionaries/20family_dynamic_number/tiramisu/base.py index c57de266a..dc7f511e6 100644 --- a/tests/dictionaries/20family_dynamic_number/tiramisu/base.py +++ b/tests/dictionaries/20family_dynamic_number/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20family_empty/tiramisu/base.py b/tests/dictionaries/20family_empty/tiramisu/base.py index c740e23df..6a0127cc0 100644 --- a/tests/dictionaries/20family_empty/tiramisu/base.py +++ b/tests/dictionaries/20family_empty/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20family_hidden/tiramisu/base.py b/tests/dictionaries/20family_hidden/tiramisu/base.py index 6566da046..1f6e7ebcc 100644 --- a/tests/dictionaries/20family_hidden/tiramisu/base.py +++ b/tests/dictionaries/20family_hidden/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20family_mode/tiramisu/base.py b/tests/dictionaries/20family_mode/tiramisu/base.py index c740e23df..6a0127cc0 100644 --- a/tests/dictionaries/20family_mode/tiramisu/base.py +++ b/tests/dictionaries/20family_mode/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20family_modeleadership/tiramisu/base.py b/tests/dictionaries/20family_modeleadership/tiramisu/base.py index e0ecc2842..3f1a1d668 100644 --- a/tests/dictionaries/20family_modeleadership/tiramisu/base.py +++ b/tests/dictionaries/20family_modeleadership/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20notemplating/tiramisu/base.py b/tests/dictionaries/20notemplating/tiramisu/base.py index 99c2699ac..27d2dfff7 100644 --- a/tests/dictionaries/20notemplating/tiramisu/base.py +++ b/tests/dictionaries/20notemplating/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/20override/tiramisu/base.py b/tests/dictionaries/20override/tiramisu/base.py index ae2d26081..2b163004a 100644 --- a/tests/dictionaries/20override/tiramisu/base.py +++ b/tests/dictionaries/20override/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/21family_empty/tiramisu/base.py b/tests/dictionaries/21family_empty/tiramisu/base.py index 363a370ac..a30877060 100644 --- a/tests/dictionaries/21family_empty/tiramisu/base.py +++ b/tests/dictionaries/21family_empty/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/30mandatory_withoutvalue/tiramisu/base.py b/tests/dictionaries/30mandatory_withoutvalue/tiramisu/base.py index a7cf61876..7186ce3bd 100644 --- a/tests/dictionaries/30mandatory_withoutvalue/tiramisu/base.py +++ b/tests/dictionaries/30mandatory_withoutvalue/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/30mandatory_withoutvaluecalc/tiramisu/base.py b/tests/dictionaries/30mandatory_withoutvaluecalc/tiramisu/base.py index 79ef128fc..798bb9953 100644 --- a/tests/dictionaries/30mandatory_withoutvaluecalc/tiramisu/base.py +++ b/tests/dictionaries/30mandatory_withoutvaluecalc/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/30mandatory_withvalue/tiramisu/base.py b/tests/dictionaries/30mandatory_withvalue/tiramisu/base.py index 4f115221c..f6e00098f 100644 --- a/tests/dictionaries/30mandatory_withvalue/tiramisu/base.py +++ b/tests/dictionaries/30mandatory_withvalue/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/30mandatory_withvaluecalc/tiramisu/base.py b/tests/dictionaries/30mandatory_withvaluecalc/tiramisu/base.py index 6d9d14358..0a2df97e5 100644 --- a/tests/dictionaries/30mandatory_withvaluecalc/tiramisu/base.py +++ b/tests/dictionaries/30mandatory_withvaluecalc/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40condition_base/tiramisu/base.py b/tests/dictionaries/40condition_base/tiramisu/base.py index 9506b5a48..865ccc072 100644 --- a/tests/dictionaries/40condition_base/tiramisu/base.py +++ b/tests/dictionaries/40condition_base/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40condition_base_add/tiramisu/base.py b/tests/dictionaries/40condition_base_add/tiramisu/base.py index 9506b5a48..865ccc072 100644 --- a/tests/dictionaries/40condition_base_add/tiramisu/base.py +++ b/tests/dictionaries/40condition_base_add/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40condition_fallback/tiramisu/base.py b/tests/dictionaries/40condition_fallback/tiramisu/base.py index 46958c54a..99a5462dc 100644 --- a/tests/dictionaries/40condition_fallback/tiramisu/base.py +++ b/tests/dictionaries/40condition_fallback/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40condition_optional/tiramisu/base.py b/tests/dictionaries/40condition_optional/tiramisu/base.py index 7f56c6c28..ca3f0aca2 100644 --- a/tests/dictionaries/40condition_optional/tiramisu/base.py +++ b/tests/dictionaries/40condition_optional/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40condition_optional_empty/tiramisu/base.py b/tests/dictionaries/40condition_optional_empty/tiramisu/base.py index a1ac8b2f4..e65f78556 100644 --- a/tests/dictionaries/40condition_optional_empty/tiramisu/base.py +++ b/tests/dictionaries/40condition_optional_empty/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40empty_param/tiramisu/base.py b/tests/dictionaries/40empty_param/tiramisu/base.py index c914025db..a7d51c071 100644 --- a/tests/dictionaries/40empty_param/tiramisu/base.py +++ b/tests/dictionaries/40empty_param/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40empty_param2/tiramisu/base.py b/tests/dictionaries/40empty_param2/tiramisu/base.py index 1bf93ce45..edf15f9d3 100644 --- a/tests/dictionaries/40empty_param2/tiramisu/base.py +++ b/tests/dictionaries/40empty_param2/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40hidden_if_in_group_fallback/tiramisu/base.py b/tests/dictionaries/40hidden_if_in_group_fallback/tiramisu/base.py index 8003d38cc..f2ad35aa5 100644 --- a/tests/dictionaries/40hidden_if_in_group_fallback/tiramisu/base.py +++ b/tests/dictionaries/40hidden_if_in_group_fallback/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40ifin_leadership/tiramisu/base.py b/tests/dictionaries/40ifin_leadership/tiramisu/base.py index aeda9463a..2953d3f61 100644 --- a/tests/dictionaries/40ifin_leadership/tiramisu/base.py +++ b/tests/dictionaries/40ifin_leadership/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py b/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py index c0806d915..a5b5f7a5a 100644 --- a/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py +++ b/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py b/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py index b5e22786c..e89316b90 100644 --- a/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py +++ b/tests/dictionaries/40ifin_leadershipauto_follower/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40ifin_multi/tiramisu/base.py b/tests/dictionaries/40ifin_multi/tiramisu/base.py index ad315820b..9f85b3569 100644 --- a/tests/dictionaries/40ifin_multi/tiramisu/base.py +++ b/tests/dictionaries/40ifin_multi/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/40ifin_validenum/tiramisu/base.py b/tests/dictionaries/40ifin_validenum/tiramisu/base.py index eeadb6bd7..5905c6e21 100644 --- a/tests/dictionaries/40ifin_validenum/tiramisu/base.py +++ b/tests/dictionaries/40ifin_validenum/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/50exists_exists/tiramisu/base.py b/tests/dictionaries/50exists_exists/tiramisu/base.py index bb07d73d2..6b19a89a1 100644 --- a/tests/dictionaries/50exists_exists/tiramisu/base.py +++ b/tests/dictionaries/50exists_exists/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/50redefine_description/tiramisu/base.py b/tests/dictionaries/50redefine_description/tiramisu/base.py index c7076cde4..5ca5fee3c 100644 --- a/tests/dictionaries/50redefine_description/tiramisu/base.py +++ b/tests/dictionaries/50redefine_description/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51exists_nonexists/tiramisu/base.py b/tests/dictionaries/51exists_nonexists/tiramisu/base.py index dddb00d6c..43413bfc8 100644 --- a/tests/dictionaries/51exists_nonexists/tiramisu/base.py +++ b/tests/dictionaries/51exists_nonexists/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51exists_redefine/tiramisu/base.py b/tests/dictionaries/51exists_redefine/tiramisu/base.py index b1396921c..59cc23ec7 100644 --- a/tests/dictionaries/51exists_redefine/tiramisu/base.py +++ b/tests/dictionaries/51exists_redefine/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_auto/tiramisu/base.py b/tests/dictionaries/51redefine_auto/tiramisu/base.py index 106cf2311..af5a56ade 100644 --- a/tests/dictionaries/51redefine_auto/tiramisu/base.py +++ b/tests/dictionaries/51redefine_auto/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_autofill/tiramisu/base.py b/tests/dictionaries/51redefine_autofill/tiramisu/base.py index e90d83e8c..fdf599c4f 100644 --- a/tests/dictionaries/51redefine_autofill/tiramisu/base.py +++ b/tests/dictionaries/51redefine_autofill/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_family/tiramisu/base.py b/tests/dictionaries/51redefine_family/tiramisu/base.py index 9cb54783b..a2c1670f2 100644 --- a/tests/dictionaries/51redefine_family/tiramisu/base.py +++ b/tests/dictionaries/51redefine_family/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_fill/tiramisu/base.py b/tests/dictionaries/51redefine_fill/tiramisu/base.py index 106cf2311..af5a56ade 100644 --- a/tests/dictionaries/51redefine_fill/tiramisu/base.py +++ b/tests/dictionaries/51redefine_fill/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_fillauto/tiramisu/base.py b/tests/dictionaries/51redefine_fillauto/tiramisu/base.py index 106cf2311..af5a56ade 100644 --- a/tests/dictionaries/51redefine_fillauto/tiramisu/base.py +++ b/tests/dictionaries/51redefine_fillauto/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_help/tiramisu/base.py b/tests/dictionaries/51redefine_help/tiramisu/base.py index 2686993b8..708ec8ec3 100644 --- a/tests/dictionaries/51redefine_help/tiramisu/base.py +++ b/tests/dictionaries/51redefine_help/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_hidden/tiramisu/base.py b/tests/dictionaries/51redefine_hidden/tiramisu/base.py index 1d4487069..d037a0e69 100644 --- a/tests/dictionaries/51redefine_hidden/tiramisu/base.py +++ b/tests/dictionaries/51redefine_hidden/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_remove_check/tiramisu/base.py b/tests/dictionaries/51redefine_remove_check/tiramisu/base.py index a1246e8d0..4c1e45412 100644 --- a/tests/dictionaries/51redefine_remove_check/tiramisu/base.py +++ b/tests/dictionaries/51redefine_remove_check/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_remove_condition/tiramisu/base.py b/tests/dictionaries/51redefine_remove_condition/tiramisu/base.py index fc3687c74..60f437730 100644 --- a/tests/dictionaries/51redefine_remove_condition/tiramisu/base.py +++ b/tests/dictionaries/51redefine_remove_condition/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_removecondition_nonautofreeze/tiramisu/base.py b/tests/dictionaries/51redefine_removecondition_nonautofreeze/tiramisu/base.py index d4ae20655..3c66d8165 100644 --- a/tests/dictionaries/51redefine_removecondition_nonautofreeze/tiramisu/base.py +++ b/tests/dictionaries/51redefine_removecondition_nonautofreeze/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_validenum/tiramisu/base.py b/tests/dictionaries/51redefine_validenum/tiramisu/base.py index 4956fadb4..5dffd58c8 100644 --- a/tests/dictionaries/51redefine_validenum/tiramisu/base.py +++ b/tests/dictionaries/51redefine_validenum/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51redefine_value/tiramisu/base.py b/tests/dictionaries/51redefine_value/tiramisu/base.py index b3207e842..94cdd2f04 100644 --- a/tests/dictionaries/51redefine_value/tiramisu/base.py +++ b/tests/dictionaries/51redefine_value/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/51remove_fill/tiramisu/base.py b/tests/dictionaries/51remove_fill/tiramisu/base.py index fb6d6f0a0..81eba2b76 100644 --- a/tests/dictionaries/51remove_fill/tiramisu/base.py +++ b/tests/dictionaries/51remove_fill/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/52exists_redefine/tiramisu/base.py b/tests/dictionaries/52exists_redefine/tiramisu/base.py index 637de1f3a..516134f6c 100644 --- a/tests/dictionaries/52exists_redefine/tiramisu/base.py +++ b/tests/dictionaries/52exists_redefine/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60action_external/tiramisu/base.py b/tests/dictionaries/60action_external/tiramisu/base.py index c9e67cd4e..20b6fdb2b 100644 --- a/tests/dictionaries/60action_external/tiramisu/base.py +++ b/tests/dictionaries/60action_external/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py b/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py index 8fbacb45c..1fc5f9a89 100644 --- a/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py +++ b/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60extra_group/tiramisu/base.py b/tests/dictionaries/60extra_group/tiramisu/base.py index 6a62992a3..009981f38 100644 --- a/tests/dictionaries/60extra_group/tiramisu/base.py +++ b/tests/dictionaries/60extra_group/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60extra_help/tiramisu/base.py b/tests/dictionaries/60extra_help/tiramisu/base.py index e76d72151..38a88c722 100644 --- a/tests/dictionaries/60extra_help/tiramisu/base.py +++ b/tests/dictionaries/60extra_help/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60extra_load/tiramisu/base.py b/tests/dictionaries/60extra_load/tiramisu/base.py index a8e7b30fa..9ec2e2ef5 100644 --- a/tests/dictionaries/60extra_load/tiramisu/base.py +++ b/tests/dictionaries/60extra_load/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60extra_mandatory/tiramisu/base.py b/tests/dictionaries/60extra_mandatory/tiramisu/base.py index d4124dd7a..53b9d1b5f 100644 --- a/tests/dictionaries/60extra_mandatory/tiramisu/base.py +++ b/tests/dictionaries/60extra_mandatory/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60extra_name_family/tiramisu/base.py b/tests/dictionaries/60extra_name_family/tiramisu/base.py index 0add9c51d..c4c9923fb 100644 --- a/tests/dictionaries/60extra_name_family/tiramisu/base.py +++ b/tests/dictionaries/60extra_name_family/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60extra_no_condition/tiramisu/base.py b/tests/dictionaries/60extra_no_condition/tiramisu/base.py index 3bbd3d3af..78316d93f 100644 --- a/tests/dictionaries/60extra_no_condition/tiramisu/base.py +++ b/tests/dictionaries/60extra_no_condition/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60extra_redefine/tiramisu/base.py b/tests/dictionaries/60extra_redefine/tiramisu/base.py index 08fda57a8..772ea0d94 100644 --- a/tests/dictionaries/60extra_redefine/tiramisu/base.py +++ b/tests/dictionaries/60extra_redefine/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60familyaction/tiramisu/base.py b/tests/dictionaries/60familyaction/tiramisu/base.py index 51a1abc6d..bc676c3cd 100644 --- a/tests/dictionaries/60familyaction/tiramisu/base.py +++ b/tests/dictionaries/60familyaction/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60familyaction_accent/tiramisu/base.py b/tests/dictionaries/60familyaction_accent/tiramisu/base.py index 51a1abc6d..bc676c3cd 100644 --- a/tests/dictionaries/60familyaction_accent/tiramisu/base.py +++ b/tests/dictionaries/60familyaction_accent/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/60familyaction_mandatory/tiramisu/base.py b/tests/dictionaries/60familyaction_mandatory/tiramisu/base.py index e672bb897..8cd701bf0 100644 --- a/tests/dictionaries/60familyaction_mandatory/tiramisu/base.py +++ b/tests/dictionaries/60familyaction_mandatory/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/61extra_dyn/tiramisu/base.py b/tests/dictionaries/61extra_dyn/tiramisu/base.py index 899034f26..3dec2b809 100644 --- a/tests/dictionaries/61extra_dyn/tiramisu/base.py +++ b/tests/dictionaries/61extra_dyn/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/61extra_dyn_extra/tiramisu/base.py b/tests/dictionaries/61extra_dyn_extra/tiramisu/base.py index 67aab539a..75c88a326 100644 --- a/tests/dictionaries/61extra_dyn_extra/tiramisu/base.py +++ b/tests/dictionaries/61extra_dyn_extra/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_files/tiramisu/base.py b/tests/dictionaries/70container_files/tiramisu/base.py index d6fc20562..0b140030e 100644 --- a/tests/dictionaries/70container_files/tiramisu/base.py +++ b/tests/dictionaries/70container_files/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py b/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py index 37d4e4bce..358bd3d3a 100644 --- a/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py +++ b/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py b/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py index 52aca0784..943ae68bc 100644 --- a/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py +++ b/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py b/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py index 6c10e5f09..f33ce3baf 100644 --- a/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py +++ b/tests/dictionaries/70container_files_symlink_variable/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_files_twice/tiramisu/base.py b/tests/dictionaries/70container_files_twice/tiramisu/base.py index 6c4fe2902..1119525ba 100644 --- a/tests/dictionaries/70container_files_twice/tiramisu/base.py +++ b/tests/dictionaries/70container_files_twice/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_filesmulti/tiramisu/base.py b/tests/dictionaries/70container_filesmulti/tiramisu/base.py index ac45a0640..92618fb43 100644 --- a/tests/dictionaries/70container_filesmulti/tiramisu/base.py +++ b/tests/dictionaries/70container_filesmulti/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_filesredefine/tiramisu/base.py b/tests/dictionaries/70container_filesredefine/tiramisu/base.py index d8a946534..d7b3c98a4 100644 --- a/tests/dictionaries/70container_filesredefine/tiramisu/base.py +++ b/tests/dictionaries/70container_filesredefine/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_new/tiramisu/base.py b/tests/dictionaries/70container_new/tiramisu/base.py index a67cbfa9c..9c3d4a640 100644 --- a/tests/dictionaries/70container_new/tiramisu/base.py +++ b/tests/dictionaries/70container_new/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_newnocont/tiramisu/base.py b/tests/dictionaries/70container_newnocont/tiramisu/base.py index 2d050b83c..9aa9d0766 100644 --- a/tests/dictionaries/70container_newnocont/tiramisu/base.py +++ b/tests/dictionaries/70container_newnocont/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_newwithip/tiramisu/base.py b/tests/dictionaries/70container_newwithip/tiramisu/base.py index b194b8ba7..a677c1144 100644 --- a/tests/dictionaries/70container_newwithip/tiramisu/base.py +++ b/tests/dictionaries/70container_newwithip/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_pathaccess/tiramisu/base.py b/tests/dictionaries/70container_pathaccess/tiramisu/base.py index 055800807..b807ff0ea 100644 --- a/tests/dictionaries/70container_pathaccess/tiramisu/base.py +++ b/tests/dictionaries/70container_pathaccess/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_pathaccess_leadership/tiramisu/base.py b/tests/dictionaries/70container_pathaccess_leadership/tiramisu/base.py index e93a8f309..4747351d2 100644 --- a/tests/dictionaries/70container_pathaccess_leadership/tiramisu/base.py +++ b/tests/dictionaries/70container_pathaccess_leadership/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_save/tiramisu/base.py b/tests/dictionaries/70container_save/tiramisu/base.py index fc64b638d..4ad152b05 100644 --- a/tests/dictionaries/70container_save/tiramisu/base.py +++ b/tests/dictionaries/70container_save/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_serviceaccess/tiramisu/base.py b/tests/dictionaries/70container_serviceaccess/tiramisu/base.py index 9960d0a54..4ba81a032 100644 --- a/tests/dictionaries/70container_serviceaccess/tiramisu/base.py +++ b/tests/dictionaries/70container_serviceaccess/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_servicerestriction/tiramisu/base.py b/tests/dictionaries/70container_servicerestriction/tiramisu/base.py index 1e18ac80c..18cb78947 100644 --- a/tests/dictionaries/70container_servicerestriction/tiramisu/base.py +++ b/tests/dictionaries/70container_servicerestriction/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70container_services/tiramisu/base.py b/tests/dictionaries/70container_services/tiramisu/base.py index 70bed63dd..625d01172 100644 --- a/tests/dictionaries/70container_services/tiramisu/base.py +++ b/tests/dictionaries/70container_services/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value) diff --git a/tests/dictionaries/70services_unmanage/tiramisu/base.py b/tests/dictionaries/70services_unmanage/tiramisu/base.py index cb6c1212b..faf26d3a0 100644 --- a/tests/dictionaries/70services_unmanage/tiramisu/base.py +++ b/tests/dictionaries/70services_unmanage/tiramisu/base.py @@ -1,5 +1,9 @@ from importlib.machinery import SourceFileLoader -func = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py').load_module() +from importlib.util import spec_from_loader, module_from_spec +loader = SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py') +spec = spec_from_loader(loader.name, loader) +func = module_from_spec(spec) +loader.exec_module(func) for key, value in dict(locals()).items(): if key != ['SourceFileLoader', 'func']: setattr(func, key, value)