Skip to content

Commit 3293b4f

Browse files
authored
Update Python 3.7 deprecation message now it has reached EOL (#1460)
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.
1 parent e5d1040 commit 3293b4f

File tree

8 files changed

+22
-27
lines changed

8 files changed

+22
-27
lines changed

.github/workflows/build_python_runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
build-and-upload-heroku-22:
4545
# We only support Python 3.9+ on Heroku-22.
46-
if: (!startsWith(inputs.python_version, '3.7.') && !startsWith(inputs.python_version,'3.8.'))
46+
if: (!startsWith(inputs.python_version,'3.8.'))
4747
runs-on: pub-hk-ubuntu-22.04-xlarge
4848
env:
4949
STACK_VERSION: "22"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- 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))
56

67
## v233 (2023-06-07)
78

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,3 @@ Supported runtime options include:
6464
- `python-3.10.12` on all [supported stacks](https://devcenter.heroku.com/articles/stack#stack-support-details)
6565
- `python-3.9.17` on all [supported stacks](https://devcenter.heroku.com/articles/stack#stack-support-details)
6666
- `python-3.8.17` on Heroku-20 only
67-
- `python-3.7.17` on Heroku-20 only

bin/steps/python

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ case "${PYTHON_VERSION}" in
5959
;;
6060
python-3.7.*)
6161
puts-warn
62-
puts-warn "Python 3.7 will reach its upstream end-of-life on June 27th, 2023, at which"
63-
puts-warn "point it will no longer receive security updates:"
62+
puts-warn "Python 3.7 reached its upstream end-of-life on June 27th, 2023, so no longer"
63+
puts-warn "receives any security updates:"
6464
puts-warn "https://devguide.python.org/versions/#supported-versions"
6565
puts-warn
66+
puts-warn "Support for Python 3.7 will be removed from this buildpack in October 2023."
67+
puts-warn
6668
puts-warn "Upgrade to a newer Python version as soon as possible to keep your app secure."
6769
puts-warn "See: https://devcenter.heroku.com/articles/python-runtimes"
6870
puts-warn

builds/build_python_runtime.sh

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ case "${STACK}" in
2424
;;
2525
heroku-20)
2626
SUPPORTED_PYTHON_VERSIONS=(
27-
"3.7"
2827
"3.8"
2928
"3.9"
3029
"3.10"
@@ -50,10 +49,6 @@ case "${PYTHON_MAJOR_VERSION}" in
5049
# https://keybase.io/ambv/
5150
GPG_KEY_FINGERPRINT='E3FF2839C048B25C084DEBE9B26995E310250568'
5251
;;
53-
3.7)
54-
# https://keybase.io/nad/
55-
GPG_KEY_FINGERPRINT='0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D'
56-
;;
5752
*)
5853
error "Error: Unsupported Python version '${PYTHON_MAJOR_VERSION}'!"
5954
;;
@@ -83,6 +78,8 @@ cd "${SRC_DIR}"
8378
CONFIGURE_OPTS=(
8479
# Support loadable extensions in the `_sqlite` extension module.
8580
"--enable-loadable-sqlite-extensions"
81+
# Enable recommended release build performance optimisations such as PGO.
82+
"--enable-optimizations"
8683
# Make autoconf's configure option validation more strict.
8784
"--enable-option-checking=fatal"
8885
# Install Python into `/app/.heroku/python` rather than the default of `/usr/local`.
@@ -95,17 +92,7 @@ CONFIGURE_OPTS=(
9592
"--with-system-expat"
9693
)
9794

98-
if [[ "${PYTHON_MAJOR_VERSION}" != "3.7" ]]; then
99-
CONFIGURE_OPTS+=(
100-
# Python 3.7 and older run the whole test suite for PGO, which takes
101-
# much too long. Whilst this can be overridden via `PROFILE_TASK`, we
102-
# prefer to change as few of the upstream build options as possible.
103-
# As such, PGO is only enabled for Python 3.8+.
104-
"--enable-optimizations"
105-
)
106-
fi
107-
108-
if [[ "${PYTHON_MAJOR_VERSION}" != 3.[7-9] ]]; then
95+
if [[ "${PYTHON_MAJOR_VERSION}" != 3.[8-9] ]]; then
10996
CONFIGURE_OPTS+=(
11097
# Shared builds are beneficial for a number of reasons:
11198
# - Reduces the size of the build, since it avoids the duplication between
@@ -147,7 +134,7 @@ fi
147134
make -j "$(nproc)" LDFLAGS='-Wl,--strip-all'
148135
make install
149136

150-
if [[ "${PYTHON_MAJOR_VERSION}" == 3.[7-9] ]]; then
137+
if [[ "${PYTHON_MAJOR_VERSION}" == 3.[8-9] ]]; then
151138
# On older versions of Python we're still building the static library, which has to be
152139
# manually stripped since the linker stripping enabled in LDFLAGS doesn't cover them.
153140
# We're using `--strip-unneeded` since `--strip-all` would remove the `.symtab` section

spec/hatchet/pipenv_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,12 @@
114114
remote: -----> Python app detected
115115
remote: -----> Using Python version specified in Pipfile.lock
116116
remote: !
117-
remote: ! Python 3.7 will reach its upstream end-of-life on June 27th, 2023, at which
118-
remote: ! point it will no longer receive security updates:
117+
remote: ! Python 3.7 reached its upstream end-of-life on June 27th, 2023, so no longer
118+
remote: ! receives any security updates:
119119
remote: ! https://devguide.python.org/versions/#supported-versions
120120
remote: !
121+
remote: ! Support for Python 3.7 will be removed from this buildpack in October 2023.
122+
remote: !
121123
remote: ! Upgrade to a newer Python version as soon as possible to keep your app secure.
122124
remote: ! See: https://devcenter.heroku.com/articles/python-runtimes
123125
remote: !

spec/hatchet/python_update_warning_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,12 @@
6767
remote: -----> Python app detected
6868
remote: -----> Using Python version specified in runtime.txt
6969
remote: !
70-
remote: ! Python 3.7 will reach its upstream end-of-life on June 27th, 2023, at which
71-
remote: ! point it will no longer receive security updates:
70+
remote: ! Python 3.7 reached its upstream end-of-life on June 27th, 2023, so no longer
71+
remote: ! receives any security updates:
7272
remote: ! https://devguide.python.org/versions/#supported-versions
7373
remote: !
74+
remote: ! Support for Python 3.7 will be removed from this buildpack in October 2023.
75+
remote: !
7476
remote: ! Upgrade to a newer Python version as soon as possible to keep your app secure.
7577
remote: ! See: https://devcenter.heroku.com/articles/python-runtimes
7678
remote: !

spec/hatchet/python_version_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,12 @@
119119
remote: -----> Python app detected
120120
remote: -----> Using Python version specified in runtime.txt
121121
remote: !
122-
remote: ! Python 3.7 will reach its upstream end-of-life on June 27th, 2023, at which
123-
remote: ! point it will no longer receive security updates:
122+
remote: ! Python 3.7 reached its upstream end-of-life on June 27th, 2023, so no longer
123+
remote: ! receives any security updates:
124124
remote: ! https://devguide.python.org/versions/#supported-versions
125125
remote: !
126+
remote: ! Support for Python 3.7 will be removed from this buildpack in October 2023.
127+
remote: !
126128
remote: ! Upgrade to a newer Python version as soon as possible to keep your app secure.
127129
remote: ! See: https://devcenter.heroku.com/articles/python-runtimes
128130
remote: !

0 commit comments

Comments
 (0)