Skip to content

Commit 3fa3f15

Browse files
authored
Remove unnecessary date conditional for Python 2 EOL warning (#1053)
Since we're past the end of 2019, so the conditional is always true. Closes @W-7952394@. [skip changelog]
1 parent a510c47 commit 3fa3f15

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

bin/steps/python

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,9 @@ if curl --output /dev/null --silent --head --fail "$VENDORED_PYTHON"; then
5252
fi
5353
fi
5454
if [[ "$PYTHON_VERSION" == $PY27* ]]; then
55+
puts-warn "$PYTHON_2_EOL_UPDATE"
56+
echo " Learn More: https://devcenter.heroku.com/articles/python-2-7-eol-faq"
5557
# security update note
56-
if [[ "$(date "+%Y")" -gt "2019" ]]; then
57-
puts-warn "$PYTHON_2_EOL_UPDATE"
58-
echo " Learn More: https://devcenter.heroku.com/articles/python-2-7-eol-faq"
59-
fi
6058
if [ "$PYTHON_VERSION" != "$LATEST_27" ]; then
6159
puts-warn "$ONLY_SUPPORTED_2_VERSION" "$LATEST_27"
6260
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"

test/run-versions

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ testPython2() {
1919
echo $LATEST_27 > "runtime.txt"
2020
compile "python2"
2121
assertCaptured $LATEST_27
22-
if [[ $(date "+%Y") > "2019" ]]; then
23-
assertCaptured "python-2-7-eol-faq";
24-
else
25-
assertNotCaptured "python-2-7-eol-faq";
26-
fi
22+
assertCaptured "python-2-7-eol-faq";
2723
assertNotCaptured "security update"
2824
assertCaptured "Installing pip 20.1.1, setuptools 44.1.1 and wheel 0.34.2"
2925
assertCaptured "Installing SQLite3"
@@ -33,11 +29,7 @@ testPython2() {
3329
testPython2_warn() {
3430
compile "python2_warn"
3531
assertCaptured "python-2.7.15"
36-
if [[ $(date "+%Y") > "2019" ]]; then
37-
assertCaptured "python-2-7-eol-faq";
38-
else
39-
assertNotCaptured "python-2-7-eol-faq";
40-
fi
32+
assertCaptured "python-2-7-eol-faq";
4133
assertCaptured "Only the latest version"
4234
assertCaptured "Installing SQLite3"
4335
assertCapturedSuccess

0 commit comments

Comments
 (0)