Skip to content

Commit

Permalink
Default to Python 3.12 instead of 3.13 (#335)
Browse files Browse the repository at this point in the history
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 released October 8. 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.

---------

Co-authored-by: Fraser Waters <[email protected]>
  • Loading branch information
julienp and Frassle authored Nov 21, 2024
1 parent c19973f commit 2b0d8e0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/matrix/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
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": {
"default": "22",
"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",
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docker/pulumi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
4 changes: 2 additions & 2 deletions tests/testdata/python-default/__main__.py
Original file line number Diff line number Diff line change
@@ -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}"

0 comments on commit 2b0d8e0

Please sign in to comment.