From b4fb2d390f5ae3729f526db20a912b12775c58a3 Mon Sep 17 00:00:00 2001 From: Julien Poissonnier Date: Thu, 21 Nov 2024 12:32:41 +0100 Subject: [PATCH 1/3] Defaulf to Python 3.12 instead of 3.13 To run on Python 3.13 you need at least pulumi [3.136.0](https://github.com/pulumi/pulumi/releases/tag/v3.136.0), which was not released that long ago. Defaulting to Python 3.13 causes issues for anyone on an older version. Python 3.12 support goes back to [3.103](https://github.com/pulumi/pulumi/releases/tag/v3.103.0), released in January. --- .github/scripts/matrix/versions.py | 6 +++--- README.md | 4 ++-- docker/pulumi/Dockerfile | 2 +- tests/testdata/python-default/__main__.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/scripts/matrix/versions.py b/.github/scripts/matrix/versions.py index cbb59890..0a004b55 100644 --- a/.github/scripts/matrix/versions.py +++ b/.github/scripts/matrix/versions.py @@ -3,7 +3,7 @@ unversioned = ["go", "java"] # For the versioned SDKS we have a default version and additional versions with suffixes. -# The default version is used for the unsuffixed image `pulumi-python` and for the suffixed version `pulumi-python-3.13`. +# The default version is used for the unsuffixed image `pulumi-python` and for the suffixed version `pulumi-python-3.12`. # The additional versions are used for the suffixed images `pulumi-python-3.10`, `pulumi-python-3.11`, ... versioned = { "nodejs": { @@ -11,8 +11,8 @@ "additional": ["18", "20", "23"] }, "python": { - "default": "3.13", - "additional": ["3.9", "3.10", "3.11", "3.12"] + "default": "3.12", + "additional": ["3.9", "3.10", "3.11", "3.13"] }, "dotnet": { "default": "8.0", diff --git a/README.md b/README.md index 0506aca0..1ff88e2b 100644 --- a/README.md +++ b/README.md @@ -40,11 +40,11 @@ Images without a version suffix use the following language versions by default: - Go 1.23 - JDK 21 - Node.js 22 - - Python 3.13 + - Python 3.12 ### Version Policy -Language runtimes are kept up-to-date with current LTS versions. You can pin the image tag to a particular version in order to avoid unintended upgrades. +Language runtimes are kept up-to-date with current LTS versions. For Python, the default version corresponds to the release prior to the latest release, for other languages thedefault version corresponds to the latest release. You can pin the image tag to a particular version in order to avoid unintended upgrades. ### Choosing a Language Version diff --git a/docker/pulumi/Dockerfile b/docker/pulumi/Dockerfile index be851152..e0be5192 100644 --- a/docker/pulumi/Dockerfile +++ b/docker/pulumi/Dockerfile @@ -139,7 +139,7 @@ RUN pyenv install 3.12 RUN pyenv install 3.11 RUN pyenv install 3.10 RUN pyenv install 3.9 -RUN pyenv global 3.13 # Default version +RUN pyenv global 3.12 # Default version # Poetry RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/usr/local/share/pypoetry python3 - RUN ln -s /usr/local/share/pypoetry/bin/poetry /usr/local/bin/ diff --git a/tests/testdata/python-default/__main__.py b/tests/testdata/python-default/__main__.py index 96172723..1ef7e311 100644 --- a/tests/testdata/python-default/__main__.py +++ b/tests/testdata/python-default/__main__.py @@ -1,4 +1,4 @@ import sys -assert sys.version_info.major == 3 and sys.version_info.minor == 13, \ - f"version should be 3.13, got {sys.version_info.major}.{sys.version_info.minor}" +assert sys.version_info.major == 3 and sys.version_info.minor == 12, \ + f"version should be 3.12, got {sys.version_info.major}.{sys.version_info.minor}" From 480b687463b73bf479e8c0018a3dfa873a112924 Mon Sep 17 00:00:00 2001 From: Julien Poissonnier Date: Thu, 21 Nov 2024 13:36:26 +0100 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d027758..c3704de9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +- Default to Python 3.12 instead of 3.13 + ([335](https://github.com/pulumi/pulumi-docker-containers/pull/335)) + - Install Python and Node.js in the UBI containers using pyenv and fnm ([326])https://github.com/pulumi/pulumi-docker-containers/pull/326)) From f9c0942b5f795ff3f4f1d0e2b185a10ecd2b3d66 Mon Sep 17 00:00:00 2001 From: Julien Date: Thu, 21 Nov 2024 14:32:41 +0100 Subject: [PATCH 3/3] Update README.md Co-authored-by: Fraser Waters --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ff88e2b..a5ad571c 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Images without a version suffix use the following language versions by default: ### Version Policy -Language runtimes are kept up-to-date with current LTS versions. For Python, the default version corresponds to the release prior to the latest release, for other languages thedefault version corresponds to the latest release. You can pin the image tag to a particular version in order to avoid unintended upgrades. +Language runtimes are kept up-to-date with current LTS versions. For Python, the default version corresponds to the release prior to the latest release, for other languages the default version corresponds to the latest release. You can pin the image tag to a particular version in order to avoid unintended upgrades. ### Choosing a Language Version