From 76e60ab6f0d6d972347064587bc0a832edbd9fbf Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Mon, 2 Oct 2023 17:55:26 +0000 Subject: [PATCH] Add tests for Python 3.12 (#120) To ensure that Python 3.12 works with this buildpack. No changes were required to the buildpack itself, and the default Python version continues to be Python 3.11.x for now. Release announcement: https://blog.python.org/2023/10/python-3120-final-now-available.html https://www.python.org/downloads/release/python-3120/ Details on what's new in Python 3.12: https://docs.python.org/3.12/whatsnew/3.12.html Binary builds on GitHub Actions: https://github.com/heroku/heroku-buildpack-python/actions/runs/6382585145 See also: https://github.com/heroku/heroku-buildpack-python/pull/1490 GUS-W-14215441. --- tests/fixtures/python_3.12/requirements.txt | 0 tests/fixtures/python_3.12/runtime.txt | 1 + tests/mod.rs | 1 + tests/python_version_test.rs | 10 ++++++++-- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 tests/fixtures/python_3.12/requirements.txt create mode 100644 tests/fixtures/python_3.12/runtime.txt diff --git a/tests/fixtures/python_3.12/requirements.txt b/tests/fixtures/python_3.12/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/tests/fixtures/python_3.12/runtime.txt b/tests/fixtures/python_3.12/runtime.txt new file mode 100644 index 0000000..44f8fbe --- /dev/null +++ b/tests/fixtures/python_3.12/runtime.txt @@ -0,0 +1 @@ +python-3.12.0 diff --git a/tests/mod.rs b/tests/mod.rs index 44222bf..e243b7d 100644 --- a/tests/mod.rs +++ b/tests/mod.rs @@ -16,6 +16,7 @@ const LATEST_PYTHON_3_8: &str = "3.8.18"; 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.5"; +const LATEST_PYTHON_3_12: &str = "3.12.0"; const DEFAULT_PYTHON_VERSION: &str = LATEST_PYTHON_3_11; const DEFAULT_BUILDER: &str = "heroku/builder:22"; diff --git a/tests/python_version_test.rs b/tests/python_version_test.rs index 53efccc..1c7cfdd 100644 --- a/tests/python_version_test.rs +++ b/tests/python_version_test.rs @@ -1,7 +1,7 @@ use crate::packaging_tool_versions::PackagingToolVersions; use crate::tests::{ - builder, DEFAULT_PYTHON_VERSION, LATEST_PYTHON_3_10, LATEST_PYTHON_3_11, LATEST_PYTHON_3_7, - LATEST_PYTHON_3_8, LATEST_PYTHON_3_9, + builder, DEFAULT_PYTHON_VERSION, LATEST_PYTHON_3_10, LATEST_PYTHON_3_11, LATEST_PYTHON_3_12, + LATEST_PYTHON_3_7, LATEST_PYTHON_3_8, LATEST_PYTHON_3_9, }; use indoc::{formatdoc, indoc}; use libcnb_test::{assert_contains, assert_empty, BuildConfig, PackResult, TestRunner}; @@ -68,6 +68,12 @@ fn python_3_11() { builds_with_python_version("tests/fixtures/python_3.11", LATEST_PYTHON_3_11); } +#[test] +#[ignore = "integration test"] +fn python_3_12() { + builds_with_python_version("tests/fixtures/python_3.12", LATEST_PYTHON_3_12); +} + fn builds_with_python_version(fixture_path: &str, python_version: &str) { let PackagingToolVersions { pip_version,