Skip to content

Commit b1690e9

Browse files
authored
Add support for Python 3.9.0 (#1090)
https://pythoninsider.blogspot.com/2020/10/python-390-is-now-available-and-you-can.html https://www.python.org/downloads/release/python-390/ https://docs.python.org/release/3.9.0/whatsnew/3.9.html Binaries generated using: ``` make deploy-runtimes RUNTIMES='python-3.9.0' STACKS='heroku-16 heroku-18' ENV_FILE=... ``` Closes @W-7791272@.
1 parent b250300 commit b1690e9

File tree

12 files changed

+47
-0
lines changed

12 files changed

+47
-0
lines changed

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+
- Python 3.9.0 is now available (CPython) (#1090).
56
- Migrate from the `lang-python` S3 bucket to `heroku-buildpack-python` (#1089).
67
- Remove `vendor/shunit2` (#1086).
78
- Replace `BUILDPACK_VENDOR_URL` and `USE_STAGING_BINARIES` with `BUILDPACK_S3_BASE_URL` (#1085).

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Specify a Python Runtime
6262

6363
Supported runtime options include:
6464

65+
- `python-3.9.0`
6566
- `python-3.8.6`
6667
- `python-3.7.9`
6768
- `python-3.6.12`

bin/compile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export S3_BASE_URL
5757
source "$BIN_DIR/default_pythons"
5858

5959
# Supported Python Branches
60+
PY39="python-3.9"
6061
PY38="python-3.8"
6162
PY37="python-3.7"
6263
PY36="python-3.6"

bin/default_pythons

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# shellcheck disable=2034
77

88
DEFAULT_PYTHON_VERSION="python-3.6.12"
9+
LATEST_39="python-3.9.0"
910
LATEST_38="python-3.8.6"
1011
LATEST_37="python-3.7.9"
1112
LATEST_36="python-3.6.12"

bin/steps/pipenv-python-version

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
3030
if [ "$PYTHON" = 3.8 ]; then
3131
echo "$LATEST_38" > "$BUILD_DIR/runtime.txt"
3232
fi
33+
if [ "$PYTHON" = 3.9 ]; then
34+
echo "$LATEST_39" > "$BUILD_DIR/runtime.txt"
35+
fi
3336
fi
3437

3538

bin/steps/python

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ PYTHON_2_EOL_UPDATE="Python 2 has reached it's community EOL. Upgrade your Pytho
1616

1717
# check if runtime exists
1818
if curl --output /dev/null --silent --head --fail "$VENDORED_PYTHON"; then
19+
if [[ "$PYTHON_VERSION" == $PY39* ]]; then
20+
if [ "$PYTHON_VERSION" != "$LATEST_39" ]; then
21+
puts-warn "$SECURITY_UPDATE" "$LATEST_39"
22+
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
23+
fi
24+
fi
1925
if [[ "$PYTHON_VERSION" == $PY38* ]]; then
2026
# do things to alert the user of security release available
2127
if [ "$PYTHON_VERSION" != "$LATEST_38" ]; then

builds/runtimes/python-3.9.0

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
# Build Path: /app/.heroku/python/
3+
4+
source $(dirname $0)/python3

test/fixtures/python3_9/requirements.txt

Whitespace-only changes.

test/fixtures/python3_9/runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.9.0

test/fixtures/python3_9_warn/requirements.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)