From bccc313a019f5fe69b8010350721dd355f0ac4ca Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 23 Apr 2026 16:24:43 +0000 Subject: [PATCH] fix(pr-review): keep both UV_PYTHON and UV_PYTHON_PREFERENCE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UV_PYTHON=3.12 alone is not sufficient — uv still downloads the version from .python-version when managed downloads are allowed. Restore UV_PYTHON_PREFERENCE=only-system alongside UV_PYTHON=3.12: - UV_PYTHON=3.12: tells uv which version to request - only-system: prevents uv from downloading a different version Together they handle .python-version in both directions: - Older (e.g. 3.11): only-system blocks the download, UV_PYTHON selects 3.12 - Newer (e.g. 3.13): only-system blocks the download, UV_PYTHON selects 3.12 Co-authored-by: openhands --- plugins/pr-review/action.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/pr-review/action.yml b/plugins/pr-review/action.yml index 48211754..e89b2c43 100644 --- a/plugins/pr-review/action.yml +++ b/plugins/pr-review/action.yml @@ -149,10 +149,11 @@ runs: - name: Run PR review shell: bash env: - # Pin uv to the exact Python installed by setup-python so it - # ignores any .python-version in the PR repo checkout (which - # could be older *or* newer than 3.12). + # Pin uv to the Python installed by setup-python and block + # managed downloads so the PR repo's .python-version (older + # *or* newer than 3.12) cannot override the interpreter. UV_PYTHON: '3.12' + UV_PYTHON_PREFERENCE: only-system LLM_MODEL: ${{ steps.select-model.outputs.selected_model }} LLM_BASE_URL: ${{ inputs.llm-base-url }} REVIEW_STYLE: ${{ inputs.review-style }}