Skip to content

Commit aade56d

Browse files
kbukum1Mark Allen
authored andcommitted
Sync uv Dockerfile Python versions with python ecosystem (#15087)
* Sync uv Dockerfile Python versions with python ecosystem Update Python version pins in the uv Dockerfile to match the versions already deployed in the python ecosystem (PR #15058). The uv ecosystem aliases the Python Language class, so the code expects these exact versions when extracting compressed Python runtimes. - 3.14.2 → 3.14.5 - 3.13.11 → 3.13.13 - 3.12.12 → 3.12.13 - 3.11.14 → 3.11.15 - 3.10.19 → 3.10.20 - 3.9.24 → 3.9.25
1 parent bd80e58 commit aade56d

7 files changed

Lines changed: 379 additions & 160 deletions

File tree

uv/Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# syntax=docker.io/docker/dockerfile:1.20
22
# This list must match the versions specified in
3-
# uv/lib/dependabot/uv/language.rb: PRE_INSTALLED_PYTHON_VERSIONS_RAW
3+
# python/lib/dependabot/python/language.rb: PRE_INSTALLED_PYTHON_VERSIONS_RAW
4+
# (`uv/lib/dependabot/uv/language.rb` aliases `Dependabot::Python::Language`).
45
# Python versions are pinned to the release of each minor/patch version.
5-
ARG PY_3_14=3.14.2
6-
ARG PY_3_13=3.13.11
7-
ARG PY_3_12=3.12.12
8-
ARG PY_3_11=3.11.14
9-
ARG PY_3_10=3.10.19
10-
ARG PY_3_9=3.9.24
6+
ARG PY_3_14=3.14.5
7+
ARG PY_3_13=3.13.13
8+
ARG PY_3_12=3.12.13
9+
ARG PY_3_11=3.11.15
10+
ARG PY_3_10=3.10.20
11+
ARG PY_3_9=3.9.25
1112
# https://github.com/pyenv/pyenv/releases
1213
ARG PYENV_VERSION=v2.6.16
1314

uv/helpers/build

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,21 @@ cp -r \
1515
"$helpers_dir/lib" \
1616
"$helpers_dir/run.py" \
1717
"$helpers_dir/requirements.txt" \
18+
"$helpers_dir/requirements-3.9.txt" \
1819
"$install_dir"
1920

2021
cd "$install_dir"
21-
PYENV_VERSION=$1 pyenv exec pip3 --disable-pip-version-check install --use-pep517 -r "requirements.txt"
22+
23+
python_version=$1
24+
# pip 26.x and several other packages require Python >=3.10.
25+
# Use 3.9-compatible versions for the deprecated Python 3.9 runtime.
26+
if [[ "$python_version" == 3.9.* ]]; then
27+
req_file="requirements-3.9.txt"
28+
else
29+
req_file="requirements.txt"
30+
fi
31+
32+
PYENV_VERSION=$python_version pyenv exec pip3 --disable-pip-version-check install --use-pep517 -r "$req_file"
2233

2334
# Remove the extra objects added during the previous install. Based on
2435
# https://github.com/docker-library/python/blob/master/Dockerfile-linux.template

uv/helpers/requirements-3.9.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Python 3.9-compatible versions pinned to the last known working set before
2+
# packages dropped 3.9 support. Python 3.9 reached end-of-life on 2025-10-31.
3+
pip==24.2
4+
pip-tools==7.5.3
5+
flake8==7.3.0
6+
hashin==1.0.5
7+
pipenv==2024.4.1
8+
plette==2.1.0
9+
poetry==2.2.1
10+
# tomli is required for Python <3.11 (stdlib tomllib was added in 3.11).
11+
tomli==2.2.1
12+
uv==0.11.8
13+
14+
# Some dependencies will only install if Cython is present
15+
Cython==3.2.4

uv/helpers/requirements.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
pip==24.0
2-
pip-tools==7.4.1
3-
flake8==7.1.0
4-
hashin==1.0.3
5-
pipenv==2024.0.2
6-
plette==2.1.0
7-
poetry==1.8.5
1+
pip==26.1.1
2+
pip-tools==7.5.3
3+
flake8==7.3.0
4+
hashin==1.0.5
5+
pipenv==2024.4.1
6+
plette==2.2.1
7+
poetry==2.3.4
88
# TODO: Replace 3p package `tomli` with 3.11's new stdlib `tomllib` once we drop support for Python 3.10.
9-
tomli==2.0.1
9+
tomli==2.4.1
1010
uv==0.11.8
1111

1212
# Some dependencies will only install if Cython is present
13-
Cython==3.0.10
13+
Cython==3.2.4

uv/spec/dependabot/uv/file_parser/pyproject_files_parser_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
end
135135

136136
describe "a development sub-dependency" do
137-
subject(:dep) { dependencies.find { |d| d.name == "atomicwrites" } }
137+
subject(:dep) { dependencies.find { |d| d.name == "click" } }
138138

139139
its(:subdependency_metadata) do
140140
is_expected.to eq([{ production: false }])

uv/spec/dependabot/uv/language_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
end
2323

2424
context "when detected version is deprecated but not unsupported" do
25-
let(:detected_version) { "3.8.1" }
25+
let(:detected_version) { "3.9.1" }
2626

2727
before do
2828
allow(language).to receive(:unsupported?).and_return(false)

0 commit comments

Comments
 (0)