Skip to content

Commit

Permalink
Update Python 3.7 deprecation message now it has reached EOL
Browse files Browse the repository at this point in the history
As of 30th June, Python 3.7 has reached end-of-life upstream:
https://devguide.python.org/versions/#supported-versions

This means there will be no new Python 3.7 patch versions released
upstream, so no security updates or bug fixes.

The existing buildpack deprecation message has been updated to
reflect this, and now also mentions that support for building Python 3.7
apps will be removed in October 2023.

In addition, the scripts and GitHub Actions workflows used to compile and
upload new Python runtime versions have been updated to drop support,
since there will be no new Python 3.7 releases for us to upload.

GUS-W-13717141.
GUS-W-13717143.
  • Loading branch information
edmorley committed Jul 6, 2023
1 parent e5d1040 commit 7f65c41
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_python_runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

build-and-upload-heroku-22:
# We only support Python 3.9+ on Heroku-22.
if: (!startsWith(inputs.python_version, '3.7.') && !startsWith(inputs.python_version,'3.8.'))
if: (!startsWith(inputs.python_version,'3.8.'))
runs-on: pub-hk-ubuntu-22.04-xlarge
env:
STACK_VERSION: "22"
Expand Down
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

- Update the Python 3.7 deprecation message to reflect that it has now reached end-of-life. ([#1460](https://github.com/heroku/heroku-buildpack-python/pull/1460))

## v233 (2023-06-07)

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ Supported runtime options include:
- `python-3.10.12` on all [supported stacks](https://devcenter.heroku.com/articles/stack#stack-support-details)
- `python-3.9.17` on all [supported stacks](https://devcenter.heroku.com/articles/stack#stack-support-details)
- `python-3.8.17` on Heroku-20 only
- `python-3.7.17` on Heroku-20 only
6 changes: 4 additions & 2 deletions bin/steps/python
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ case "${PYTHON_VERSION}" in
;;
python-3.7.*)
puts-warn
puts-warn "Python 3.7 will reach its upstream end-of-life on June 27th, 2023, at which"
puts-warn "point it will no longer receive security updates:"
puts-warn "Python 3.7 reached its upstream end-of-life on June 27th, 2023, so no longer"
puts-warn "receives any security updates:"
puts-warn "https://devguide.python.org/versions/#supported-versions"
puts-warn
puts-warn "Support for Python 3.7 will be removed from this buildpack in October 2023."
puts-warn
puts-warn "Upgrade to a newer Python version as soon as possible to keep your app secure."
puts-warn "See: https://devcenter.heroku.com/articles/python-runtimes"
puts-warn
Expand Down
21 changes: 4 additions & 17 deletions builds/build_python_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ case "${STACK}" in
;;
heroku-20)
SUPPORTED_PYTHON_VERSIONS=(
"3.7"
"3.8"
"3.9"
"3.10"
Expand All @@ -50,10 +49,6 @@ case "${PYTHON_MAJOR_VERSION}" in
# https://keybase.io/ambv/
GPG_KEY_FINGERPRINT='E3FF2839C048B25C084DEBE9B26995E310250568'
;;
3.7)
# https://keybase.io/nad/
GPG_KEY_FINGERPRINT='0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D'
;;
*)
error "Error: Unsupported Python version '${PYTHON_MAJOR_VERSION}'!"
;;
Expand Down Expand Up @@ -83,6 +78,8 @@ cd "${SRC_DIR}"
CONFIGURE_OPTS=(
# Support loadable extensions in the `_sqlite` extension module.
"--enable-loadable-sqlite-extensions"
# Enable recommended release build performance optimisations such as PGO.
"--enable-optimizations"
# Make autoconf's configure option validation more strict.
"--enable-option-checking=fatal"
# Install Python into `/app/.heroku/python` rather than the default of `/usr/local`.
Expand All @@ -95,17 +92,7 @@ CONFIGURE_OPTS=(
"--with-system-expat"
)

if [[ "${PYTHON_MAJOR_VERSION}" != "3.7" ]]; then
CONFIGURE_OPTS+=(
# Python 3.7 and older run the whole test suite for PGO, which takes
# much too long. Whilst this can be overridden via `PROFILE_TASK`, we
# prefer to change as few of the upstream build options as possible.
# As such, PGO is only enabled for Python 3.8+.
"--enable-optimizations"
)
fi

if [[ "${PYTHON_MAJOR_VERSION}" != 3.[7-9] ]]; then
if [[ "${PYTHON_MAJOR_VERSION}" != 3.[8-9] ]]; then
CONFIGURE_OPTS+=(
# Shared builds are beneficial for a number of reasons:
# - Reduces the size of the build, since it avoids the duplication between
Expand Down Expand Up @@ -147,7 +134,7 @@ fi
make -j "$(nproc)" LDFLAGS='-Wl,--strip-all'
make install

if [[ "${PYTHON_MAJOR_VERSION}" == 3.[7-9] ]]; then
if [[ "${PYTHON_MAJOR_VERSION}" == 3.[8-9] ]]; then
# On older versions of Python we're still building the static library, which has to be
# manually stripped since the linker stripping enabled in LDFLAGS doesn't cover them.
# We're using `--strip-unneeded` since `--strip-all` would remove the `.symtab` section
Expand Down
6 changes: 4 additions & 2 deletions spec/hatchet/pipenv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,12 @@
remote: -----> Python app detected
remote: -----> Using Python version specified in Pipfile.lock
remote: !
remote: ! Python 3.7 will reach its upstream end-of-life on June 27th, 2023, at which
remote: ! point it will no longer receive security updates:
remote: ! Python 3.7 reached its upstream end-of-life on June 27th, 2023, so no longer
remote: ! receives any security updates:
remote: ! https://devguide.python.org/versions/#supported-versions
remote: !
remote: ! Support for Python 3.7 will be removed from this buildpack in October 2023.
remote: !
remote: ! Upgrade to a newer Python version as soon as possible to keep your app secure.
remote: ! See: https://devcenter.heroku.com/articles/python-runtimes
remote: !
Expand Down
6 changes: 4 additions & 2 deletions spec/hatchet/python_update_warning_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: !
remote: ! Python 3.7 will reach its upstream end-of-life on June 27th, 2023, at which
remote: ! point it will no longer receive security updates:
remote: ! Python 3.7 reached its upstream end-of-life on June 27th, 2023, so no longer
remote: ! receives any security updates:
remote: ! https://devguide.python.org/versions/#supported-versions
remote: !
remote: ! Support for Python 3.7 will be removed from this buildpack in October 2023.
remote: !
remote: ! Upgrade to a newer Python version as soon as possible to keep your app secure.
remote: ! See: https://devcenter.heroku.com/articles/python-runtimes
remote: !
Expand Down
6 changes: 4 additions & 2 deletions spec/hatchet/python_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: !
remote: ! Python 3.7 will reach its upstream end-of-life on June 27th, 2023, at which
remote: ! point it will no longer receive security updates:
remote: ! Python 3.7 reached its upstream end-of-life on June 27th, 2023, so no longer
remote: ! receives any security updates:
remote: ! https://devguide.python.org/versions/#supported-versions
remote: !
remote: ! Support for Python 3.7 will be removed from this buildpack in October 2023.
remote: !
remote: ! Upgrade to a newer Python version as soon as possible to keep your app secure.
remote: ! See: https://devcenter.heroku.com/articles/python-runtimes
remote: !
Expand Down

0 comments on commit 7f65c41

Please sign in to comment.