Skip to content

Commit 06b7f97

Browse files
authored
Merge pull request #729 from heroku/bug/728
Prevent Python 3.7 from being unsupported
2 parents a775b06 + 74873b5 commit 06b7f97

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

bin/compile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,16 @@ export VENDOR_URL
5050
# as well as prompt the user to upgrade if they are using an un–supported version.
5151
# Note: When 3.7 lands, I recommend switching to LATEST_36 and LATEST_37.
5252
DEFAULT_PYTHON_VERSION="python-3.6.6"
53-
LATEST_3="python-3.6.6"
53+
LATEST_36="python-3.6.6"
54+
LATEST_37="python-3.7.0"
5455
LATEST_2="python-2.7.15"
5556

5657
# Which stack is used (for binary downloading), if none is provided (e.g. outside of Heroku)?
5758
DEFAULT_PYTHON_STACK="cedar-14"
5859
# If pip doesn't match this version (the version we install), run the installer.
5960
PIP_UPDATE="9.0.2"
6061

61-
export DEFAULT_PYTHON_VERSION DEFAULT_PYTHON_STACK PIP_UPDATE LATEST_2 LATEST_3
62+
export DEFAULT_PYTHON_VERSION DEFAULT_PYTHON_STACK PIP_UPDATE LATEST_2 LATEST_36 LATEST_37
6263

6364
# Common Problem Warnings:
6465
# This section creates a temporary file in which to stick the output of `pip install`.

bin/steps/pipenv-python-version

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
2222
echo "$LATEST_2" > "$BUILD_DIR/runtime.txt"
2323
fi
2424
if [ "$PYTHON" = 3.6 ]; then
25-
echo "$LATEST_3" > "$BUILD_DIR/runtime.txt"
25+
echo "$LATEST_36" > "$BUILD_DIR/runtime.txt"
26+
fi
27+
if [ "$PYTHON" = 3.7 ]; then
28+
echo "$LATEST_37" > "$BUILD_DIR/runtime.txt"
2629
fi
2730
fi
2831

bin/steps/python

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,17 @@ if [[ $PYTHON_VERSION =~ ^python-2 ]]; then
1414
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
1515
fi
1616
else
17-
if [[ "$PYTHON_VERSION" != "$LATEST_3" ]]; then
18-
puts-warn "The latest version of Python 3 is $LATEST_3 (you are using $PYTHON_VERSION, which is unsupported)."
19-
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_3)."
17+
if [[ $PYTHON_VERSION =~ ^python-3.7 ]] && [[ "$PYTHON_VERSION" != "$LATEST_37" ]]; then
18+
puts-warn "The latest version of Python 3.7 is $LATEST_37 (you are using $PYTHON_VERSION, which is unsupported)."
19+
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_37)."
2020
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
21+
else
22+
if [[ "$PYTHON_VERSION" != "$LATEST_36" ]]; then
23+
puts-warn "The latest version of Python 3.6 is $LATEST_36 (you are using $PYTHON_VERSION, which is unsupported)."
24+
puts-warn "We recommend upgrading by specifying the latest version ($LATEST_36)."
25+
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
26+
fi
2127
fi
22-
2328
fi
2429

2530
if [[ "$STACK" != "$CACHED_PYTHON_STACK" ]]; then

0 commit comments

Comments
 (0)