diff --git a/CHANGELOG.md b/CHANGELOG.md index 20228cdc80ebfb5fb6e23f4551cc1fda9317e66d..34659454afbe460d5db75e4fb3b5f65a8d5776ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ # Master +- Add support for Python 3.8 branch - Sqlite3 Update: - Add Tests - Test for Pysqlite diff --git a/bin/compile b/bin/compile index 284b3132d53eadc12bb8d4c860b8ea5171bd3019..9319463af264f41e6f107b433e1729587792eb9a 100755 --- a/bin/compile +++ b/bin/compile @@ -52,6 +52,7 @@ export VENDOR_URL source "$BIN_DIR/default_pythons" # Supported Python Branches +PY38="python-3.8" PY37="python-3.7" PY36="python-3.6" PY35="python-3.5" diff --git a/bin/default_pythons b/bin/default_pythons index e0f443f18ce38e805c0d9934d6ee8e3304727ddb..ecc569c1dde08fcca9feb0e59b881e4ffc0abd6e 100755 --- a/bin/default_pythons +++ b/bin/default_pythons @@ -1,10 +1,11 @@ #!/usr/bin/env bash DEFAULT_PYTHON_VERSION="python-3.6.9" +LATEST_38="python-3.8.0" +LATEST_37="python-3.7.5" LATEST_36="python-3.6.9" -LATEST_37="python-3.7.4" LATEST_35="python-3.5.7" LATEST_34="python-3.4.10" LATEST_27="python-2.7.16" -export DEFAULT_PYTHON_VERSION LATEST_37 LATEST_36 LATEST_35 LATEST_34 LATEST_27 +export DEFAULT_PYTHON_VERSION LATEST_38 LATEST_37 LATEST_36 LATEST_35 LATEST_34 LATEST_27 diff --git a/bin/steps/python b/bin/steps/python index 2d007549ef4ef2d80dbd532a4a2587b7aa5b56c3..2625b4431ad3549e2f81ef20fea5c71452074ead 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -11,6 +11,13 @@ SECURITY_UPDATE="Python has released a security update! Please consider upgradin # check if runtime exists if curl --output /dev/null --silent --head --fail "$VENDORED_PYTHON"; then + if [[ "$PYTHON_VERSION" == $PY38* ]]; then + # do things to alert the user of security release available + if [ "$PYTHON_VERSION" != "$LATEST_38" ]; then + puts-warn "$SECURITY_UPDATE" "$LATEST_38" + echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes" + fi + fi if [[ "$PYTHON_VERSION" == $PY37* ]]; then # do things to alert the user of security release available if [ "$PYTHON_VERSION" != "$LATEST_37" ]; then diff --git a/test/fixtures/python3_8/requirements.txt b/test/fixtures/python3_8/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..f2293605cf1b01dca72aad0a15c45b72ed5429a2 --- /dev/null +++ b/test/fixtures/python3_8/requirements.txt @@ -0,0 +1 @@ +requests diff --git a/test/fixtures/python3_8/runtime.txt b/test/fixtures/python3_8/runtime.txt new file mode 100644 index 0000000000000000000000000000000000000000..73b1cf81dbefd27e35da668939fd56bfe0dc018d --- /dev/null +++ b/test/fixtures/python3_8/runtime.txt @@ -0,0 +1 @@ +python-3.8.0 diff --git a/test/fixtures/python3_8_fail/requirements.txt b/test/fixtures/python3_8_fail/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..7e1060246fd6746a14204539a72e199a25469a05 --- /dev/null +++ b/test/fixtures/python3_8_fail/requirements.txt @@ -0,0 +1 @@ +flask diff --git a/test/fixtures/python3_8_fail/runtime.txt b/test/fixtures/python3_8_fail/runtime.txt new file mode 100644 index 0000000000000000000000000000000000000000..fbcec36aa1a241ebd401df4023260021c5a62c61 --- /dev/null +++ b/test/fixtures/python3_8_fail/runtime.txt @@ -0,0 +1 @@ +python-3.8.99 diff --git a/test/run-versions b/test/run-versions index 6feb5e1558be797a7010615bed1026226f32dcd0..15c7e38fe1503fcd2eb97aee2b5a7f9774d54d90 100755 --- a/test/run-versions +++ b/test/run-versions @@ -146,6 +146,25 @@ testPython3_7_fail() { assertCapturedError } +testPython3_8() { + updateVersion "python3_8" $LATEST_38 + compile "python3_8" + if [[ $STACK = "cedar-14" ]]; then + assertCapturedError + else + assertNotCaptured "security update" + assertCaptured $LATEST_38 + assertCaptured "Installing SQLite3" + assertCapturedSuccess + fi +} + +testPython3_8_fail() { + compile "python3_8_fail" + assertCaptured "Aborting" + assertCapturedError +} + pushd $(dirname 0) >/dev/null popd >/dev/null