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

Fix the "Python security update available" version check #1569

Merged
merged 1 commit into from
Apr 18, 2024
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 @@ -2,6 +2,7 @@

## [Unreleased]

- Fixed the "Python security update is available" warning being shown when the requested version is newer than the latest version known to the buildpack. ([#1569](https://github.com/heroku/heroku-buildpack-python/pull/1569))
- Fixed glibc warnings seen when downgrading the stack version. ([#1568](https://github.com/heroku/heroku-buildpack-python/pull/1568))
- Adjusted compiler options used to build Python for improved parity with the Docker Hub Python images. ([#1566](https://github.com/heroku/heroku-buildpack-python/pull/1566))
- Excluded `LD_LIBRARY_PATH` and `PYTHONHOME` app config vars when invoking subprocesses during the build. ([#1565](https://github.com/heroku/heroku-buildpack-python/pull/1565))
Expand Down
7 changes: 5 additions & 2 deletions bin/steps/python
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ function eol_python_version_error() {
}

function warn_if_patch_update_available() {
local current_version="${1}"
local requested_version="${1}"
local latest_patch_version="${2}"
if [[ "${current_version}" != "${latest_patch_version}" ]]; then
# Extract the patch version component of the version strings (ie: the '5' in '3.10.5').
local requested_patch_number="${requested_version##*.}"
local latest_patch_number="${latest_patch_version##*.}"
if (( requested_patch_number < latest_patch_number )); then
puts-warn
puts-warn "A Python security update is available! Upgrade as soon as possible to: ${latest_patch_version}"
puts-warn "See: https://devcenter.heroku.com/articles/python-runtimes"
Expand Down