From ced14fd84116ce0bd98a0b0efe0d73369e93bae4 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Sat, 7 Sep 2024 11:40:02 +0100 Subject: [PATCH] Add support for Python 3.8.20, 3.9.20, 3.10.15, 3.11.10 and 3.12.6 Changelogs: https://docs.python.org/release/3.8.20/whatsnew/changelog.html#python-3-8-20-final https://docs.python.org/release/3.9.20/whatsnew/changelog.html#python-3-9-20-final https://docs.python.org/release/3.10.15/whatsnew/changelog.html#python-3-10-15-final https://docs.python.org/release/3.11.10/whatsnew/changelog.html#python-3-11-10-final https://docs.python.org/release/3.12.6/whatsnew/changelog.html#python-3-12-6-final Binary builds: https://github.com/heroku/heroku-buildpack-python/actions/runs/10750205053/job/29818038722 https://github.com/heroku/heroku-buildpack-python/actions/runs/10751132694/job/29818059983 https://github.com/heroku/heroku-buildpack-python/actions/runs/10750206118 https://github.com/heroku/heroku-buildpack-python/actions/runs/10750206743 https://github.com/heroku/heroku-buildpack-python/actions/runs/10750207733 GUS-W-16690152. --- CHANGELOG.md | 4 ++++ README.md | 2 +- src/python_version.rs | 2 +- .../django_staticfiles_legacy_django/runtime.txt | 2 +- tests/fixtures/python_3.10/runtime.txt | 2 +- tests/fixtures/python_3.11/runtime.txt | 2 +- tests/fixtures/python_3.12/runtime.txt | 2 +- tests/fixtures/python_3.8/runtime.txt | 2 +- tests/fixtures/python_3.9/runtime.txt | 2 +- tests/mod.rs | 10 +++++----- tests/pip_test.rs | 13 ++++++++----- 11 files changed, 25 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9144761..58a9494 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] +### Changed + +- Updated the default Python version from 3.12.5 to 3.12.6. ([#266](https://github.com/heroku/buildpacks-python/pull/266)) + ## [0.17.0] - 2024-09-04 ### Added diff --git a/README.md b/README.md index e4bf265..b52c35c 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ To install a different version, add a `runtime.txt` file to your app's root dire ```term $ cat runtime.txt -python-3.12.5 +python-3.12.6 ``` In the future this buildpack will also support specifying the Python version using: diff --git a/src/python_version.rs b/src/python_version.rs index f37aaa7..c971fef 100644 --- a/src/python_version.rs +++ b/src/python_version.rs @@ -9,7 +9,7 @@ use std::path::Path; pub(crate) const DEFAULT_PYTHON_VERSION: PythonVersion = PythonVersion { major: 3, minor: 12, - patch: 5, + patch: 6, }; /// Representation of a specific Python `X.Y.Z` version. diff --git a/tests/fixtures/django_staticfiles_legacy_django/runtime.txt b/tests/fixtures/django_staticfiles_legacy_django/runtime.txt index 2bccd9d..bb60b7f 100644 --- a/tests/fixtures/django_staticfiles_legacy_django/runtime.txt +++ b/tests/fixtures/django_staticfiles_legacy_django/runtime.txt @@ -1 +1 @@ -python-3.10.14 +python-3.10.15 diff --git a/tests/fixtures/python_3.10/runtime.txt b/tests/fixtures/python_3.10/runtime.txt index 2bccd9d..bb60b7f 100644 --- a/tests/fixtures/python_3.10/runtime.txt +++ b/tests/fixtures/python_3.10/runtime.txt @@ -1 +1 @@ -python-3.10.14 +python-3.10.15 diff --git a/tests/fixtures/python_3.11/runtime.txt b/tests/fixtures/python_3.11/runtime.txt index 546f3c8..e345195 100644 --- a/tests/fixtures/python_3.11/runtime.txt +++ b/tests/fixtures/python_3.11/runtime.txt @@ -1 +1 @@ -python-3.11.9 +python-3.11.10 diff --git a/tests/fixtures/python_3.12/runtime.txt b/tests/fixtures/python_3.12/runtime.txt index 8a7cba5..32bcba6 100644 --- a/tests/fixtures/python_3.12/runtime.txt +++ b/tests/fixtures/python_3.12/runtime.txt @@ -1 +1 @@ -python-3.12.5 +python-3.12.6 diff --git a/tests/fixtures/python_3.8/runtime.txt b/tests/fixtures/python_3.8/runtime.txt index 96307d5..7494875 100644 --- a/tests/fixtures/python_3.8/runtime.txt +++ b/tests/fixtures/python_3.8/runtime.txt @@ -1 +1 @@ -python-3.8.19 +python-3.8.20 diff --git a/tests/fixtures/python_3.9/runtime.txt b/tests/fixtures/python_3.9/runtime.txt index 4458b43..57f5588 100644 --- a/tests/fixtures/python_3.9/runtime.txt +++ b/tests/fixtures/python_3.9/runtime.txt @@ -1 +1 @@ -python-3.9.19 +python-3.9.20 diff --git a/tests/mod.rs b/tests/mod.rs index d760e08..e06e095 100644 --- a/tests/mod.rs +++ b/tests/mod.rs @@ -15,11 +15,11 @@ use std::env; use std::path::Path; const LATEST_PYTHON_3_7: &str = "3.7.17"; -const LATEST_PYTHON_3_8: &str = "3.8.19"; -const LATEST_PYTHON_3_9: &str = "3.9.19"; -const LATEST_PYTHON_3_10: &str = "3.10.14"; -const LATEST_PYTHON_3_11: &str = "3.11.9"; -const LATEST_PYTHON_3_12: &str = "3.12.5"; +const LATEST_PYTHON_3_8: &str = "3.8.20"; +const LATEST_PYTHON_3_9: &str = "3.9.20"; +const LATEST_PYTHON_3_10: &str = "3.10.15"; +const LATEST_PYTHON_3_11: &str = "3.11.10"; +const LATEST_PYTHON_3_12: &str = "3.12.6"; const DEFAULT_PYTHON_VERSION: &str = LATEST_PYTHON_3_12; const DEFAULT_BUILDER: &str = "heroku/builder:24"; diff --git a/tests/pip_test.rs b/tests/pip_test.rs index c6052a3..f29d313 100644 --- a/tests/pip_test.rs +++ b/tests/pip_test.rs @@ -188,18 +188,21 @@ fn pip_cache_previous_buildpack_version() { To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes [Installing Python] - Using cached Python {DEFAULT_PYTHON_VERSION} + Discarding cached Python 3.12.5 since: + - The Python version has changed from 3.12.5 to {DEFAULT_PYTHON_VERSION} + Installing Python {DEFAULT_PYTHON_VERSION} [Installing pip] - Using cached pip {PIP_VERSION} + Discarding cached pip {PIP_VERSION} + Installing pip {PIP_VERSION} [Installing dependencies using pip] - Using cached pip download/wheel cache + Discarding cached pip download/wheel cache Creating virtual environment Running 'pip install -r requirements.txt' Collecting typing-extensions==4.12.2 (from -r requirements.txt (line 2)) - Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB) - Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB) + Downloading typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB) + Downloading typing_extensions-4.12.2-py3-none-any.whl (37 kB) Installing collected packages: typing-extensions Successfully installed typing-extensions-4.12.2 "}