Skip to content

Commit 9b72199

Browse files
authored
Merge branch 'master' into new-pythons
2 parents fb1ca18 + 39e4e85 commit 9b72199

File tree

9 files changed

+35
-2
lines changed

9 files changed

+35
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Master
44

55
- Python 3.7.5 and 3.8.0 now available on Heroku 18 and 16.
6+
- Add support for Python 3.8 branch
67
- Sqlite3 Update:
78
- Add Tests
89
- Test for Pysqlite

bin/compile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export VENDOR_URL
5252
source "$BIN_DIR/default_pythons"
5353

5454
# Supported Python Branches
55+
PY38="python-3.8"
5556
PY37="python-3.7"
5657
PY36="python-3.6"
5758
PY35="python-3.5"

bin/default_pythons

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/usr/bin/env bash
22

33
DEFAULT_PYTHON_VERSION="python-3.6.9"
4+
LATEST_38="python-3.8.0"
5+
LATEST_37="python-3.7.5"
46
LATEST_36="python-3.6.9"
5-
LATEST_37="python-3.7.4"
67
LATEST_35="python-3.5.7"
78
LATEST_34="python-3.4.10"
89
LATEST_27="python-2.7.16"
910

10-
export DEFAULT_PYTHON_VERSION LATEST_37 LATEST_36 LATEST_35 LATEST_34 LATEST_27
11+
export DEFAULT_PYTHON_VERSION LATEST_38 LATEST_37 LATEST_36 LATEST_35 LATEST_34 LATEST_27

bin/steps/python

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ SECURITY_UPDATE="Python has released a security update! Please consider upgradin
1111

1212
# check if runtime exists
1313
if curl --output /dev/null --silent --head --fail "$VENDORED_PYTHON"; then
14+
if [[ "$PYTHON_VERSION" == $PY38* ]]; then
15+
# do things to alert the user of security release available
16+
if [ "$PYTHON_VERSION" != "$LATEST_38" ]; then
17+
puts-warn "$SECURITY_UPDATE" "$LATEST_38"
18+
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
19+
fi
20+
fi
1421
if [[ "$PYTHON_VERSION" == $PY37* ]]; then
1522
# do things to alert the user of security release available
1623
if [ "$PYTHON_VERSION" != "$LATEST_37" ]; then
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
requests

test/fixtures/python3_8/runtime.txt

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

test/run-versions

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,25 @@ testPython3_7_fail() {
146146
assertCapturedError
147147
}
148148

149+
testPython3_8() {
150+
updateVersion "python3_8" $LATEST_38
151+
compile "python3_8"
152+
if [[ $STACK = "cedar-14" ]]; then
153+
assertCapturedError
154+
else
155+
assertNotCaptured "security update"
156+
assertCaptured $LATEST_38
157+
assertCaptured "Installing SQLite3"
158+
assertCapturedSuccess
159+
fi
160+
}
161+
162+
testPython3_8_fail() {
163+
compile "python3_8_fail"
164+
assertCaptured "Aborting"
165+
assertCapturedError
166+
}
167+
149168
pushd $(dirname 0) >/dev/null
150169
popd >/dev/null
151170

0 commit comments

Comments
 (0)