Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Added support for Python 3.15. ([#633](https://github.com/heroku/buildpacks-python/pull/633))

### Changed

- Updated libcnb to 0.32.0, which includes OpenTelemetry crate upgrades. ([#629](https://github.com/heroku/buildpacks-python/pull/629))
Expand Down
4 changes: 3 additions & 1 deletion src/python_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub(crate) const DEFAULT_PYTHON_VERSION: RequestedPythonVersion = RequestedPytho
pub(crate) const DEFAULT_PYTHON_FULL_VERSION: PythonVersion = LATEST_PYTHON_3_14;

pub(crate) const OLDEST_SUPPORTED_PYTHON_3_MINOR_VERSION: u16 = 10;
pub(crate) const NEWEST_SUPPORTED_PYTHON_3_MINOR_VERSION: u16 = 14;
pub(crate) const NEWEST_SUPPORTED_PYTHON_3_MINOR_VERSION: u16 = 15;
pub(crate) const NEXT_UNRELEASED_PYTHON_3_MINOR_VERSION: u16 =
NEWEST_SUPPORTED_PYTHON_3_MINOR_VERSION + 1;

Expand All @@ -26,6 +26,7 @@ pub(crate) const LATEST_PYTHON_3_11: PythonVersion = PythonVersion::new(3, 11, 1
pub(crate) const LATEST_PYTHON_3_12: PythonVersion = PythonVersion::new(3, 12, 15);
pub(crate) const LATEST_PYTHON_3_13: PythonVersion = PythonVersion::new(3, 13, 16);
pub(crate) const LATEST_PYTHON_3_14: PythonVersion = PythonVersion::new(3, 14, 8);
pub(crate) const LATEST_PYTHON_3_15: PythonVersion = PythonVersion::new(3, 15, 0);

/// The Python version that was requested for a project.
#[derive(Clone, Debug, PartialEq)]
Expand Down Expand Up @@ -177,6 +178,7 @@ pub(crate) fn resolve_python_version(
(3, 12, None) => Ok(LATEST_PYTHON_3_12),
(3, 13, None) => Ok(LATEST_PYTHON_3_13),
(3, 14, None) => Ok(LATEST_PYTHON_3_14),
(3, 15, None) => Ok(LATEST_PYTHON_3_15),
(major, minor, Some(patch)) => Ok(PythonVersion::new(major, minor, patch)),
}
}
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/python_3.15/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.15
Empty file.
8 changes: 7 additions & 1 deletion tests/python_version_test.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::python_version::{
DEFAULT_PYTHON_FULL_VERSION, DEFAULT_PYTHON_VERSION, LATEST_PYTHON_3_10, LATEST_PYTHON_3_11,
LATEST_PYTHON_3_12, LATEST_PYTHON_3_13, LATEST_PYTHON_3_14,
LATEST_PYTHON_3_12, LATEST_PYTHON_3_13, LATEST_PYTHON_3_14, LATEST_PYTHON_3_15,
NEWEST_SUPPORTED_PYTHON_3_MINOR_VERSION, PythonVersion,
};
use crate::tests::default_build_config;
Expand Down Expand Up @@ -59,6 +59,12 @@ fn python_3_14() {
builds_with_python_version("tests/fixtures/python_3.14", &LATEST_PYTHON_3_14);
}

#[test]
#[ignore = "integration test"]
fn python_3_15() {
builds_with_python_version("tests/fixtures/python_3.15", &LATEST_PYTHON_3_15);
}

fn builds_with_python_version(fixture_path: &str, python_version: &PythonVersion) {
let &PythonVersion {
major,
Expand Down