Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.7.17, 3.8.17, 3.9.17, 3.10.12 and 3.11.4 #45

Merged
merged 1 commit into from
Jun 7, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- The default Python version is now 3.11.4 (previously 3.11.3). ([#45](https://github.com/heroku/buildpacks-python/pull/45))
- Updated setuptools from 67.7.2 to 67.8.0. ([#43](https://github.com/heroku/buildpacks-python/pull/43))
- Updated libcnb from 0.11.5 to 0.12.0. ([#35](https://github.com/heroku/buildpacks-python/pull/35))
- The buildpack now implements Buildpack API 0.9 instead of 0.8, and so requires `lifecycle` 0.15.x or newer. ([#35](https://github.com/heroku/buildpacks-python/pull/35))
Expand Down
6 changes: 3 additions & 3 deletions src/python_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::path::Path;
pub(crate) const DEFAULT_PYTHON_VERSION: PythonVersion = PythonVersion {
major: 3,
minor: 11,
patch: 3,
patch: 4,
};

/// Representation of a specific Python `X.Y.Z` version.
Expand Down Expand Up @@ -92,8 +92,8 @@ mod tests {
#[test]
fn determine_python_version_runtime_txt_valid() {
assert_eq!(
determine_python_version(Path::new("tests/fixtures/python_3.9")).unwrap(),
PythonVersion::new(3, 9, 16)
determine_python_version(Path::new("tests/fixtures/python_3.7")).unwrap(),
PythonVersion::new(3, 7, 17)
);
assert_eq!(
determine_python_version(Path::new("tests/fixtures/runtime_txt_non_existent_version"))
Expand Down
4 changes: 2 additions & 2 deletions src/runtime_txt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ mod tests {
#[test]
fn read_version_valid_runtime_txt() {
assert_eq!(
read_version(Path::new("tests/fixtures/python_3.9")).unwrap(),
Some(PythonVersion::new(3, 9, 16))
read_version(Path::new("tests/fixtures/python_3.7")).unwrap(),
Some(PythonVersion::new(3, 7, 17))
);
assert_eq!(
read_version(Path::new("tests/fixtures/runtime_txt_non_existent_version")).unwrap(),
Expand Down
4 changes: 2 additions & 2 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ mod tests {
#[test]
fn read_optional_file_valid_file() {
assert_eq!(
read_optional_file(Path::new("tests/fixtures/python_3.9/runtime.txt")).unwrap(),
Some("python-3.9.16\n".to_string())
read_optional_file(Path::new("tests/fixtures/python_3.7/runtime.txt")).unwrap(),
Some("python-3.7.17\n".to_string())
);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/python_3.10/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.10.11
python-3.10.12
2 changes: 1 addition & 1 deletion tests/fixtures/python_3.11/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.11.3
python-3.11.4
2 changes: 1 addition & 1 deletion tests/fixtures/python_3.7/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.7.16
python-3.7.17
2 changes: 1 addition & 1 deletion tests/fixtures/python_3.8/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.8.16
python-3.8.17
2 changes: 1 addition & 1 deletion tests/fixtures/python_3.9/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.9.16
python-3.9.17
10 changes: 5 additions & 5 deletions tests/integration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ mod pip;
mod python_version;
mod salesforce_functions;

const LATEST_PYTHON_3_7: &str = "3.7.16";
const LATEST_PYTHON_3_8: &str = "3.8.16";
const LATEST_PYTHON_3_9: &str = "3.9.16";
const LATEST_PYTHON_3_10: &str = "3.10.11";
const LATEST_PYTHON_3_11: &str = "3.11.3";
const LATEST_PYTHON_3_7: &str = "3.7.17";
const LATEST_PYTHON_3_8: &str = "3.8.17";
const LATEST_PYTHON_3_9: &str = "3.9.17";
const LATEST_PYTHON_3_10: &str = "3.10.12";
const LATEST_PYTHON_3_11: &str = "3.11.4";
const DEFAULT_PYTHON_VERSION: &str = LATEST_PYTHON_3_11;

const DEFAULT_BUILDER: &str = "heroku/builder:22";
Expand Down