refactor: Replace Pyodide with native Python with env flag is enabled (#19403)

This commit is contained in:
Iván Ovejero
2025-09-11 11:28:12 +02:00
committed by GitHub
parent 18cccb29ea
commit 052e24ef0e
7 changed files with 42 additions and 14 deletions

View File

@@ -69,4 +69,19 @@ export class TaskRunnersConfig {
*/
@Env('N8N_RUNNERS_INSECURE_MODE')
insecureMode: boolean = false;
/**
* Whether to enable the Python task runner (beta). This will replace the
* Pyodide option with the native Python option in the Code node. Expects a
* Python task runner to be available, typically in a sidecar container.
*
* Actions required:
* - Any Code node set to the legacy `python` parameter will need to be manually
* updated to use the new `pythonNative` parameter.
* - Any Code node script relying on Pyodide syntax is likely to need to be manually
* adjusted to account for breaking changes:
* https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/#python-native-beta
*/
@Env('N8N_NATIVE_PYTHON_RUNNER')
isNativePythonRunnerEnabled: boolean = false;
}

View File

@@ -260,6 +260,7 @@ describe('GlobalConfig', () => {
taskTimeout: 300,
heartbeatInterval: 30,
insecureMode: false,
isNativePythonRunnerEnabled: false,
},
sentry: {
backendDsn: '',