From a0091abc144d119c0a1d2f1f26bee56f4628e04f Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Tue, 10 Nov 2026 21:36:29 +0000 Subject: [PATCH] fix(scripts): require Python 3.13 in dev-setup.sh requirements-dev.txt pins ansible-core 2.22.0, which needs Python 3.13+. The script still accepted 3.11+, so on a 3.11 host pip failed with an opaque 'no matching distribution' error, and an existing 3.11 venv was kept instead of rebuilt. Raise the guard, fix the message and comments. Co-Authored-By: Claude Sonnet 5.5 --- scripts/dev-setup.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/dev-setup.sh b/scripts/dev-setup.sh index ad7ee17..4909920 100755 --- a/scripts/dev-setup.sh +++ b/scripts/dev-setup.sh @@ -2,10 +2,10 @@ # Sets up a local checkout for development: a virtualenv with the pinned tools # (requirements-dev.txt, the versions CI runs) and git hooks that find them. # -# scripts/dev-setup.sh # KAMINO_PYTHON=python3.12 scripts/dev-setup.sh to pick one +# scripts/dev-setup.sh # KAMINO_PYTHON=python3.13 scripts/dev-setup.sh to pick one # # KAMINO_PYTHON (default python3) selects the interpreter that is checked and that creates -# a new virtualenv. An existing virtualenv is kept when it already runs Python 3.11+, even +# a new virtualenv. An existing virtualenv is kept when it already runs Python 3.13+, even # if it was built by another interpreter; only an older one is rebuilt. # # The repository is the one this script lives in, whatever the caller's working directory. @@ -20,12 +20,14 @@ # again after changing requirements-dev.txt or the hook types. set -euo pipefail -# ansible-core 2.19 (requirements-dev.txt) needs Python 3.11+. The ci image uses the -# distribution's 3.12; any 3.11+ gives the same pins. +# ansible-core 2.22 (requirements-dev.txt) needs Python 3.13+. Renovate raises that pin, so +# when a bump of it changes the minimum Python, raise py_ok and the message below in the +# same pull request. The ci image has python3.13 next to the distribution's; +# without a system 3.13, `uv python install 3.13` provides one. python="${KAMINO_PYTHON:-python3}" -py_ok='import sys; sys.exit(0 if sys.version_info >= (3, 11) else 1)' +py_ok='import sys; sys.exit(0 if sys.version_info >= (3, 13) else 1)' if ! "$python" -c "$py_ok" 2>/dev/null; then - echo "error: $python is missing or older than 3.11 (ansible-core 2.19 needs 3.11+); set KAMINO_PYTHON=/path/to/python3.12" >&2 + echo "error: $python is missing or older than 3.13 (ansible-core 2.22 needs 3.13+); set KAMINO_PYTHON=/path/to/python3.13 (uv python install 3.13)" >&2 exit 1 fi