n8n/packages/@n8n/task-runner-python
Mutasem Aldmour 09632b6711
fix(core): Address review feedback on the Python import policy
- Only treat imports as unrestricted when BOTH allowlists are wildcards, which is
  the condition the runner's own analyzer short-circuits on. With one wildcard the
  runner still checks the other category, and classifying a module needs Python's
  stdlib list, so the linter now abstains explicitly instead of implying the
  import is fine.
- Render the two allowlists as separate categories in the prompt and the lint
  message. Merging them presented a module filed under the wrong one as
  importable, though the runner rejects it.
- Stop claiming "this deployment allowlists nothing" when no policy was supplied.
  The sandbox CLI cannot see the configuration, and now says so.
- Report a wildcard combined with named modules as a misconfiguration rather than
  as a permissive allowlist. The runner refuses to start on it, so the previous
  reading told the builder its imports were fine when no Python could run at all.
- Only trust the policy in the build-time check when it is authoritative. In
  external runner mode the runner may be stricter than n8n thinks, so a
  non-authoritative policy must not silence a warning.
- Skip a stale `pythonCode` body on a node whose language is JavaScript.
- Replace a `toContain('re')` assertion that also matched "runner" in the
  surrounding prompt text, and correct the fixture's path to its Python checker.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 11:56:28 +02:00
..
src refactor: Assign task runner IDs from n8n (#35494) 2026-08-10 11:20:37 +00:00
tests fix(core): Address review feedback on the Python import policy 2026-08-27 11:56:28 +02:00
.editorconfig feat(core): Add auth and offers flow to native Python runner (no-changelog) (#18354) 2025-08-15 14:36:42 +02:00
.python-version refactor(core): Downgrade to Python 3.13 (#21135) 2025-10-24 10:10:54 +02:00
justfile chore(core): Streamline runner debugging (#23854) 2026-01-05 14:09:47 +01:00
pyproject.toml fix: Fix security issue in urllib3 via minor version upgrade from 2.6.3 to 2.7.0 in packages (#31075) 2026-05-25 14:38:43 +00:00
pyrightconfig.json feat(core): Add auth and offers flow to native Python runner (no-changelog) (#18354) 2025-08-15 14:36:42 +02:00
README.md refactor(core): Downgrade to Python 3.13 (#21135) 2025-10-24 10:10:54 +02:00
uv.lock fix: Fix security issue in urllib3 via minor version upgrade from 2.6.3 to 2.7.0 in packages (#31075) 2026-05-25 14:38:43 +00:00

n8n Task Runner Python

Native Python task runner for n8n

Development

Install:

Set up dependencies:

just sync # or
just sync-all

See justfile for available commands.