Skip to content
Snippets Groups Projects
Unverified Commit 06b7f97e authored by Ian Stapleton Cordasco's avatar Ian Stapleton Cordasco Committed by GitHub
Browse files

Merge pull request #729 from heroku/bug/728

Prevent Python 3.7 from being unsupported
parents a775b06d 74873b5b
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,8 @@ export VENDOR_URL
# as well as prompt the user to upgrade if they are using an un–supported version.
# Note: When 3.7 lands, I recommend switching to LATEST_36 and LATEST_37.
DEFAULT_PYTHON_VERSION="python-3.6.6"
LATEST_3="python-3.6.6"
LATEST_36="python-3.6.6"
LATEST_37="python-3.7.0"
LATEST_2="python-2.7.15"
# Which stack is used (for binary downloading), if none is provided (e.g. outside of Heroku)?
......@@ -58,7 +59,7 @@ DEFAULT_PYTHON_STACK="cedar-14"
# If pip doesn't match this version (the version we install), run the installer.
PIP_UPDATE="9.0.2"
export DEFAULT_PYTHON_VERSION DEFAULT_PYTHON_STACK PIP_UPDATE LATEST_2 LATEST_3
export DEFAULT_PYTHON_VERSION DEFAULT_PYTHON_STACK PIP_UPDATE LATEST_2 LATEST_36 LATEST_37
# Common Problem Warnings:
# This section creates a temporary file in which to stick the output of `pip install`.
......
......@@ -22,7 +22,10 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
echo "$LATEST_2" > "$BUILD_DIR/runtime.txt"
fi
if [ "$PYTHON" = 3.6 ]; then
echo "$LATEST_3" > "$BUILD_DIR/runtime.txt"
echo "$LATEST_36" > "$BUILD_DIR/runtime.txt"
fi
if [ "$PYTHON" = 3.7 ]; then
echo "$LATEST_37" > "$BUILD_DIR/runtime.txt"
fi
fi
......
......@@ -14,12 +14,17 @@ if [[ $PYTHON_VERSION =~ ^python-2 ]]; then
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
fi
else
if [[ "$PYTHON_VERSION" != "$LATEST_3" ]]; then
puts-warn "The latest version of Python 3 is $LATEST_3 (you are using $PYTHON_VERSION, which is unsupported)."
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_3)."
if [[ $PYTHON_VERSION =~ ^python-3.7 ]] && [[ "$PYTHON_VERSION" != "$LATEST_37" ]]; then
puts-warn "The latest version of Python 3.7 is $LATEST_37 (you are using $PYTHON_VERSION, which is unsupported)."
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_37)."
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
else
if [[ "$PYTHON_VERSION" != "$LATEST_36" ]]; then
puts-warn "The latest version of Python 3.6 is $LATEST_36 (you are using $PYTHON_VERSION, which is unsupported)."
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_36)."
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
fi
fi
fi
if [[ "$STACK" != "$CACHED_PYTHON_STACK" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment