diff --git a/.github/workflows/build_python_runtime.yml b/.github/workflows/build_python_runtime.yml index ab62a5548..ded6e1e73 100644 --- a/.github/workflows/build_python_runtime.yml +++ b/.github/workflows/build_python_runtime.yml @@ -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" diff --git a/CHANGELOG.md b/CHANGELOG.md index 768b76ef6..f1e87a561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index 5bafc068c..a4eb8a044 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/bin/steps/python b/bin/steps/python index 0a74594f1..b2019ffb4 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -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 diff --git a/builds/build_python_runtime.sh b/builds/build_python_runtime.sh index 69e75a672..982f3370d 100755 --- a/builds/build_python_runtime.sh +++ b/builds/build_python_runtime.sh @@ -24,7 +24,6 @@ case "${STACK}" in ;; heroku-20) SUPPORTED_PYTHON_VERSIONS=( - "3.7" "3.8" "3.9" "3.10" @@ -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}'!" ;; @@ -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`. @@ -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 @@ -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 diff --git a/spec/hatchet/pipenv_spec.rb b/spec/hatchet/pipenv_spec.rb index 35d720d8f..3f4cb5d73 100644 --- a/spec/hatchet/pipenv_spec.rb +++ b/spec/hatchet/pipenv_spec.rb @@ -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: ! diff --git a/spec/hatchet/python_update_warning_spec.rb b/spec/hatchet/python_update_warning_spec.rb index d3c10b71e..9ebd034ae 100644 --- a/spec/hatchet/python_update_warning_spec.rb +++ b/spec/hatchet/python_update_warning_spec.rb @@ -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: ! diff --git a/spec/hatchet/python_version_spec.rb b/spec/hatchet/python_version_spec.rb index 7647ea3e9..215b96252 100644 --- a/spec/hatchet/python_version_spec.rb +++ b/spec/hatchet/python_version_spec.rb @@ -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: !