diff --git a/.github/scripts/matrix/versions.py b/.github/scripts/matrix/versions.py index cbb5989..0a004b5 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/CHANGELOG.md b/CHANGELOG.md index 5d02775..c3704de 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)) diff --git a/README.md b/README.md index 0506aca..a5ad571 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 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 diff --git a/docker/pulumi/Dockerfile b/docker/pulumi/Dockerfile index be85115..e0be519 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 9617272..1ef7e31 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}"