diff --git a/CHANGELOG.md b/CHANGELOG.md index 46d0b77..5262c83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,15 @@ # Master - Test staged binaries on Travis -- Sqlite3 Update: - - Add Tests - - Test for Pysqlite -- Bug fix: pipenv no longer installs twice on CI -- Add support for staging binary testing + -------------------------------------------------------------------------------- +# 158 (2019-10-21) + +- Python 3.7.5 and 3.8.0 now available on Heroku 18 and 16. +- Add support for Python 3.8 branch +- Sqlite3 Update: + - Test Improvements +- Add support for staging binary testing # 157 (2019-09-18) diff --git a/bin/compile b/bin/compile index 284b313..9319463 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 e0f443f..ecc569c 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/pipenv b/bin/steps/pipenv index c799c7d..a84d549 100755 --- a/bin/steps/pipenv +++ b/bin/steps/pipenv @@ -60,16 +60,10 @@ if [ ! "$SKIP_PIPENV_INSTALL" ]; then # avoid this eager behavior. /app/.heroku/python/bin/pip install pipenv==$PIPENV_VERSION --upgrade --upgrade-strategy only-if-needed &> /dev/null - # Install the test dependencies, for CI. - if [ "$INSTALL_TEST" ]; then - puts-step "Installing test dependencies…" - /app/.heroku/python/bin/pipenv install --dev --system --deploy 2>&1 | cleanup | indent - # Install the dependencies. - elif [[ ! -f Pipfile.lock ]]; then + if [[ ! -f Pipfile.lock ]]; then puts-step "Installing dependencies with Pipenv $PIPENV_VERSION…" /app/.heroku/python/bin/pipenv install --system --skip-lock 2>&1 | indent - else pipenv-to-pip Pipfile.lock > requirements.txt "$BIN_DIR/steps/pip-uninstall" @@ -79,6 +73,12 @@ if [ ! "$SKIP_PIPENV_INSTALL" ]; then puts-step "Installing dependencies with Pipenv $PIPENV_VERSION…" /app/.heroku/python/bin/pipenv install --system --deploy 2>&1 | indent fi + + # Install the test dependencies, for CI. + if [ "$INSTALL_TEST" ]; then + puts-step "Installing test dependencies…" + /app/.heroku/python/bin/pipenv install --dev --system --deploy 2>&1 | cleanup | indent + fi fi else export SKIP_PIP_INSTALL=1 diff --git a/bin/steps/python b/bin/steps/python index 2d00754..2625b44 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/builds/runtimes/python-3.7.5 b/builds/runtimes/python-3.7.5 new file mode 100755 index 0000000..ad41723 --- /dev/null +++ b/builds/runtimes/python-3.7.5 @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# Build Path: /app/.heroku/python/ + +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.8.0 b/builds/runtimes/python-3.8.0 new file mode 100755 index 0000000..ad41723 --- /dev/null +++ b/builds/runtimes/python-3.8.0 @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# Build Path: /app/.heroku/python/ + +source $(dirname $0)/python3 diff --git a/test/fixtures/python3_4_warn/runtime.txt b/test/fixtures/python3_4_warn/runtime.txt index fe5dcf7..cc8325f 100644 --- a/test/fixtures/python3_4_warn/runtime.txt +++ b/test/fixtures/python3_4_warn/runtime.txt @@ -1 +1 @@ -python-3.4.0 +python-3.4.9 diff --git a/test/fixtures/python3_8/requirements.txt b/test/fixtures/python3_8/requirements.txt new file mode 100644 index 0000000..f229360 --- /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 0000000..73b1cf8 --- /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 0000000..7e10602 --- /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 0000000..fbcec36 --- /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 6feb5e1..2526238 100755 --- a/test/run-versions +++ b/test/run-versions @@ -49,13 +49,9 @@ testPython3_4() { testPython3_4_warn() { compile "python3_4_warn" - if [[ $STACK = "cedar-14" ]]; then - assertCaptured "python-3.4.0" - assertCaptured "security update!" - assertCapturedSuccess - else - assertCapturedError - fi + assertCaptured "python-3.4.9" + assertCaptured "security update!" + assertCapturedSuccess } testPython3_4_fail() { @@ -146,6 +142,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