Skip to content

Commit

Permalink
Use Python 3.12 as the default Python version (#152)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
edmorley authored Dec 5, 2023
1 parent d5175db commit 9bce2f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

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

## [0.7.3] - 2023-11-06
Expand Down
4 changes: 2 additions & 2 deletions src/python_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use std::path::Path;
/// The Python version that will be installed if the project does not specify an explicit version.
pub(crate) const DEFAULT_PYTHON_VERSION: PythonVersion = PythonVersion {
major: 3,
minor: 11,
patch: 6,
minor: 12,
patch: 0,
};

/// Representation of a specific Python `X.Y.Z` version.
Expand Down
2 changes: 1 addition & 1 deletion tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const LATEST_PYTHON_3_9: &str = "3.9.18";
const LATEST_PYTHON_3_10: &str = "3.10.13";
const LATEST_PYTHON_3_11: &str = "3.11.6";
const LATEST_PYTHON_3_12: &str = "3.12.0";
const DEFAULT_PYTHON_VERSION: &str = LATEST_PYTHON_3_11;
const DEFAULT_PYTHON_VERSION: &str = LATEST_PYTHON_3_12;

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

Expand Down

0 comments on commit 9bce2f7

Please sign in to comment.