Skip to content

Commit 29f1606

Browse files
authored
Use Python 3.13 as the default Python version for new apps (#1715)
Previously if a new app did not specify a Python version (e.g. via a `.python-version` file), then the buildpack would default to the latest Python 3.12 release. Now the buildpack will use the latest Python 3.13 release. This does not affect: * apps that specify an explicit Python version * existing apps that have already had a build using the previous default version (since that version is remembered from one build to the next, via the "version pinning" / "sticky versions" feature). Use-cases involving new apps that aren't compatible with Python 3.13 will now need to specify Python 3.12 explicitly: https://devcenter.heroku.com/articles/python-support#specify-a-python-version However most apps should be compatible, since Python 3.13 was released a couple of months ago (2024-10-07), does not contain significant breaking changes over Python 3.12, and has been happily used by the python-getting-started project since 2024-10-10. See: https://docs.python.org/3.13/whatsnew/3.13.html GUS-W-14846972.
1 parent b77dd09 commit 29f1606

File tree

40 files changed

+126
-140
lines changed

40 files changed

+126
-140
lines changed

.github/workflows/build_python_runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
inputs:
77
python_version:
8-
description: "Python version (eg: 3.12.0)"
8+
description: "Python version (eg: 3.13.0)"
99
type: string
1010
required: true
1111
stack:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [Unreleased]
44

5+
- Changed the default Python version for new apps from 3.12 to 3.13. ([#1715](https://github.com/heroku/heroku-buildpack-python/pull/1715))
56
- Changed Python version pinning behaviour for apps that do not specify a Python version. Repeat builds are now pinned to the major Python version only (`3.X`) instead of the full Python version (`3.X.Y`), so that they always use the latest patch version. ([#1714](https://github.com/heroku/heroku-buildpack-python/pull/1714))
67

78
## [v269] - 2024-12-04

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ If none of those are found, the buildpack will use a default Python version for
3737
build of an app, and then subsequent builds of that app will be pinned to that version
3838
unless the build cache is cleared or you request a different version.
3939

40-
The current default Python version is: 3.12
40+
The current default Python version is: 3.13
4141

4242
The supported Python versions are:
4343

lib/python_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LATEST_PYTHON_3_11="3.11.11"
1111
LATEST_PYTHON_3_12="3.12.8"
1212
LATEST_PYTHON_3_13="3.13.1"
1313

14-
DEFAULT_PYTHON_FULL_VERSION="${LATEST_PYTHON_3_12}"
14+
DEFAULT_PYTHON_FULL_VERSION="${LATEST_PYTHON_3_13}"
1515
DEFAULT_PYTHON_MAJOR_VERSION="${DEFAULT_PYTHON_FULL_VERSION%.*}"
1616

1717
# Integer with no redundant leading zeros.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12
1+
3.13

spec/fixtures/ci_pipenv/Pipfile.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12
1+
3.13

spec/fixtures/ci_poetry/poetry.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/fixtures/ci_poetry/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
package-mode = false
33

44
[tool.poetry.dependencies]
5-
python = "^3.12"
5+
python = "^3.13"
66
typing-extensions = "*"
77

88
[tool.poetry.group.test.dependencies]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12
1+
3.13

0 commit comments

Comments
 (0)