diff --git a/CHANGELOG.md b/CHANGELOG.md index 74f2fbd..80d1442 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/src/python_version.rs b/src/python_version.rs index 87cacf6..96b6268 100644 --- a/src/python_version.rs +++ b/src/python_version.rs @@ -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; @@ -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)] @@ -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)), } } diff --git a/tests/fixtures/python_3.15/.python-version b/tests/fixtures/python_3.15/.python-version new file mode 100644 index 0000000..93a848f --- /dev/null +++ b/tests/fixtures/python_3.15/.python-version @@ -0,0 +1 @@ +3.15 diff --git a/tests/fixtures/python_3.15/requirements.txt b/tests/fixtures/python_3.15/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/python_version_test.rs b/tests/python_version_test.rs index df1f859..8856fcc 100644 --- a/tests/python_version_test.rs +++ b/tests/python_version_test.rs @@ -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; @@ -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,