fix(dev-python): hand requires-python to the remote script with a valid backreference

76adaeb9e8 wrote the regex_search group reference as '\1' inside the folded
task scalar. Jinja unescapes string literals, so the filter received \x01,
rejected it as an unknown argument and failed the dev-python task on every
remote host. The literal is now '\\1', and the unit test renders the task's
environment expression the way Ansible does instead of only checking that
the variable is named.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5.5 committed 2026-11-03 15:55:22 +01:00
1 parent 76adaeb9e8
commit 81e2be2204
2 files changed
+29 -2

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@
SKIP_DOCKER_APT_SANITIZER: "1"
INFINITO_PYTHON_REQUIRES: >-
{{ lookup('file', lookup('path_absolute', 'pyproject.toml'))
| regex_search('(?m)^requires-python\s*=\s*"([^"]+)"', '\1')
| regex_search('(?m)^requires-python\\s*=\\s*"([^"]+)"', '\\1')
| first }}
become: true