Skip to content

Commit

Permalink
Update tests for Python 3.9 on Ubuntu 24.04
Browse files Browse the repository at this point in the history
Previously Python 3.9 was only supported on the Heroku-22
stack (Ubuntu 22.04) and older, since it reaches EOL in Oct 2025.

However, support for Python 3.9 on Heroku-24 (Ubuntu 24.04) was
just added, by the building/uploading of the binaries in:
heroku/heroku-buildpack-python#1656

As such, the tests need updating to reflect that CNB builds will no
longer fail with an unavailable Python error when using Python 3.9
on `heroku/builder:24`.

GUS-W-16917997.
  • Loading branch information
edmorley committed Oct 6, 2024
1 parent 4f1ff92 commit 2c734c6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
3 changes: 2 additions & 1 deletion tests/django_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn django_staticfiles_latest_django() {
);
}

// This tests the oldest Django version that works on Python 3.10 (which is the
// This tests the oldest Django version that works on Python 3.9 (which is the
// oldest Python that is available on all of our supported builders).
#[test]
#[ignore = "integration test"]
Expand All @@ -40,6 +40,7 @@ fn django_staticfiles_legacy_django() {
indoc! {"
[Generating Django static files]
Running 'manage.py collectstatic'
Linking '/workspace/testapp/static/robots.txt'
1 static file symlinked to '/workspace/staticfiles'.
"}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10
3.9
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This is the oldest Django version that works on Python 3.10 (which is the
# This is the oldest Django version that works on Python 3.9 (which is the
# oldest Python that is available on all of our supported builders).
Django==2.1.15
Django==1.8.19
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.10.0
python-3.9.0
13 changes: 3 additions & 10 deletions tests/python_version_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,7 @@ fn python_3_8() {
#[test]
#[ignore = "integration test"]
fn python_3_9() {
// Python 3.9 is only available on Heroku-22 and older.
let fixture = "tests/fixtures/python_3.9";
match builder().as_str() {
"heroku/builder:20" | "heroku/builder:22" => {
builds_with_python_version(fixture, &LATEST_PYTHON_3_9);
}
_ => rejects_non_existent_python_version(fixture, &LATEST_PYTHON_3_9),
};
builds_with_python_version("tests/fixtures/python_3.9", &LATEST_PYTHON_3_9);
}

#[test]
Expand Down Expand Up @@ -309,10 +302,10 @@ fn runtime_txt() {
context.pack_stdout,
indoc! {"
[Determining Python version]
Using Python version 3.10.0 specified in runtime.txt
Using Python version 3.9.0 specified in runtime.txt
[Installing Python]
Installing Python 3.10.0
Installing Python 3.9.0
"}
);
});
Expand Down

0 comments on commit 2c734c6

Please sign in to comment.