From 18408bcaa1820dd22be31aea718cc0aed282575f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Fri, 5 Sep 2025 14:58:19 +0200 Subject: [PATCH] fix(core): Allow `importlib` in `sys.modules` in native Python runner (no-changelog) (#19244) --- packages/@n8n/task-runner-python/src/task_executor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@n8n/task-runner-python/src/task_executor.py b/packages/@n8n/task-runner-python/src/task_executor.py index 5d0a86a4fe..82d9c81863 100644 --- a/packages/@n8n/task-runner-python/src/task_executor.py +++ b/packages/@n8n/task-runner-python/src/task_executor.py @@ -336,6 +336,8 @@ class TaskExecutor: "sys", "traceback", "linecache", + "importlib", + "importlib.machinery", } if "*" in stdlib_allow: