Skip to content

Commit 9bce2f7

Browse files
authored
Use Python 3.12 as the default Python version (#152)
Previously if an app did not specify a Python version via a `runtime.txt` file, then the buildpack would default to the latest Python 3.11 release. Now the buildpack will use the latest Python 3.12 release. Use-cases involving new apps that aren't compatible with Python 3.12 will now need to specify Python 3.11 explicitly. However most apps should be compatible, since Python 3.12 was released a couple of months ago (2023-10-02), does not contain significant breaking changes over Python 3.11, and has been happily used by the python-getting-started project since 2023-10-04. Note: For the Python CNB, this change also affects existing apps, since the CNB no longer uses the "stick versions" approach used by the classic Python buildpack. See: https://docs.python.org/3.12/whatsnew/3.12.html GUS-W-14217496.
1 parent d5175db commit 9bce2f7

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111

12+
- Changed the default Python version from 3.11 to 3.12. ([#152](https://github.com/heroku/buildpacks-python/pull/152))
1213
- Updated wheel from 0.41.3 to 0.42.0. ([#150](https://github.com/heroku/buildpacks-python/pull/150))
1314

1415
## [0.7.3] - 2023-11-06

src/python_version.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use std::path::Path;
88
/// The Python version that will be installed if the project does not specify an explicit version.
99
pub(crate) const DEFAULT_PYTHON_VERSION: PythonVersion = PythonVersion {
1010
major: 3,
11-
minor: 11,
12-
patch: 6,
11+
minor: 12,
12+
patch: 0,
1313
};
1414

1515
/// Representation of a specific Python `X.Y.Z` version.

tests/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const LATEST_PYTHON_3_9: &str = "3.9.18";
1717
const LATEST_PYTHON_3_10: &str = "3.10.13";
1818
const LATEST_PYTHON_3_11: &str = "3.11.6";
1919
const LATEST_PYTHON_3_12: &str = "3.12.0";
20-
const DEFAULT_PYTHON_VERSION: &str = LATEST_PYTHON_3_11;
20+
const DEFAULT_PYTHON_VERSION: &str = LATEST_PYTHON_3_12;
2121

2222
const DEFAULT_BUILDER: &str = "heroku/builder:22";
2323

0 commit comments

Comments
 (0)