Skip to content

Commit 7d3b3b2

Browse files
Revert "Update pip to 20.3.4/21.3.1 (new dependency resolver) (heroku#1259)"
This reverts commit b82ddba. This was done to unblock Zenput deployments. See https://zenput.atlassian.net/browse/ZP-7880
1 parent 98242c0 commit 7d3b3b2

File tree

6 files changed

+54
-48
lines changed

6 files changed

+54
-48
lines changed

CHANGELOG.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22

33
## Unreleased
44

5-
- Update pip from 20.2.4 to: ([#1259](https://github.com/heroku/heroku-buildpack-python/pull/1259))
6-
- 20.3.4 for Python 2.7 and 3.5
7-
- 21.3.1 for Python 3.6+
85

96
## v201 (2021-10-20)
107

11-
- Update setuptools from 47.1.1 to: ([#1254](https://github.com/heroku/heroku-buildpack-python/pull/1254))
8+
- Update setuptools from 47.1.1 to: ([#1253](https://github.com/heroku/heroku-buildpack-python/pull/1254))
129
- 50.3.2 for Python 3.5
1310
- 57.5.0 for Python 3.6+
14-
- Update wheel from 0.36.2 to 0.37.0 ([#1254](https://github.com/heroku/heroku-buildpack-python/pull/1254)).
11+
- Update wheel from 0.36.2 to 0.37.0 ([#1253](https://github.com/heroku/heroku-buildpack-python/pull/1254)).
1512
- Perform editable package `.pth` and `.egg-link` path rewriting at runtime ([#1252](https://github.com/heroku/heroku-buildpack-python/pull/1252)).
1613

1714
## v200 (2021-10-04)

bin/steps/python

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ fi
150150

151151
set -e
152152

153-
PIP_VERSION='21.3.1'
153+
PIP_VERSION='20.2.4'
154154
SETUPTOOLS_VERSION='57.5.0'
155155
WHEEL_VERSION='0.37.0'
156156

@@ -160,12 +160,10 @@ if [[ "${PYTHON_VERSION}" == ${PY34}* ]]; then
160160
SETUPTOOLS_VERSION='43.0.0'
161161
WHEEL_VERSION='0.33.6'
162162
elif [[ "${PYTHON_VERSION}" == ${PY27}* || "${PYTHON_VERSION}" == ${PYPY27}* ]]; then
163-
# Python 2.7 support was dropped in pip 21+ and setuptools 45+.
164-
PIP_VERSION='20.3.4'
163+
# Python 2.7 support was dropped in setuptools 45+.
165164
SETUPTOOLS_VERSION='44.1.1'
166165
elif [[ "${PYTHON_VERSION}" == ${PY35}* ]]; then
167-
# Python 3.5 support was dropped in pip 21+ and setuptools 51+.
168-
PIP_VERSION='20.3.4'
166+
# Python 3.5 support was dropped in setuptools 51+.
169167
SETUPTOOLS_VERSION='50.3.2'
170168
fi
171169

@@ -178,14 +176,7 @@ puts-step "Installing pip ${PIP_VERSION}, setuptools ${SETUPTOOLS_VERSION} and w
178176
# - we would still have to manage several versions of get-pip.py, to support older Pythons.
179177
# Instead, we use the pip wheel to install itself, using the method described here:
180178
# https://github.com/pypa/pip/issues/2351#issuecomment-69994524
181-
182-
PIP_MAJOR_VERSION="${PIP_VERSION%%.*}"
183-
if [[ "${PIP_MAJOR_VERSION}" -ge 21 ]]; then
184-
# Pip 21+ dropped support for Python 2, so no longer uses universal wheels.
185-
PIP_WHEEL_FILENAME="pip-${PIP_VERSION}-py3-none-any.whl"
186-
else
187-
PIP_WHEEL_FILENAME="pip-${PIP_VERSION}-py2.py3-none-any.whl"
188-
fi
179+
PIP_WHEEL_FILENAME="pip-${PIP_VERSION}-py2.py3-none-any.whl"
189180
PIP_WHEEL_URL="${S3_BASE_URL}/common/${PIP_WHEEL_FILENAME}"
190181
PIP_WHEEL="${TMPDIR:-/tmp}/${PIP_WHEEL_FILENAME}"
191182

spec/hatchet/pip_spec.rb

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
remote: -----> No Python version was specified. Using the buildpack default: python-#{DEFAULT_PYTHON_VERSION}
2323
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
2424
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
25-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
25+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
2626
remote: -----> Installing SQLite3
2727
remote: -----> Installing requirements with pip
2828
remote: Collecting urllib3
@@ -38,7 +38,7 @@
3838
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
3939
remote: -----> No change in requirements detected, installing from cache
4040
remote: -----> Using cached install of python-#{DEFAULT_PYTHON_VERSION}
41-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
41+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
4242
remote: -----> Installing SQLite3
4343
remote: -----> Installing requirements with pip
4444
remote: -----> Discovering process types
@@ -61,7 +61,7 @@
6161
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
6262
remote: -----> Requirements file has been changed, clearing cached dependencies
6363
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
64-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
64+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
6565
remote: -----> Installing SQLite3
6666
remote: -----> Installing requirements with pip
6767
remote: Collecting urllib3
@@ -94,14 +94,21 @@
9494
it 'rewrites .pth and .egg-link paths correctly for hooks, later buildpacks, runtime and cached builds' do
9595
app.deploy do |app|
9696
expect(clean_output(app.output)).to match(Regexp.new(<<~REGEX))
97-
remote: Successfully installed gunicorn-20.1.0 local-package-0.0.1
97+
remote: -----> Installing requirements with pip
98+
remote: Obtaining file:///tmp/build_.*/local_package \\(from -r /tmp/build_.*/requirements.txt \\(line 1\\)\\)
99+
remote: Obtaining gunicorn from git\\+https://github.com/benoitc/gunicorn@20.1.0#egg=gunicorn \\(from -r /tmp/build_.*/requirements.txt \\(line 2\\)\\)
100+
remote: Cloning https://github.com/benoitc/gunicorn \\(to revision 20.1.0\\) to /app/.heroku/src/gunicorn
101+
remote: Installing collected packages: gunicorn, local-package
102+
remote: Running setup.py develop for gunicorn
103+
remote: Running setup.py develop for local-package
104+
remote: Successfully installed gunicorn local-package
98105
remote: -----> Running post-compile hook
99106
remote: ==> .heroku/python/lib/python.*/site-packages/distutils-precedence.pth <==
100-
remote: .*
107+
remote: import os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get\\(var, 'stdlib'\\) == 'local'; enabled and __import__\\('_distutils_hack'\\).add_shim\\(\\);
101108
remote:
102109
remote: ==> .heroku/python/lib/python.*/site-packages/easy-install.pth <==
103-
remote: /tmp/build_.*/local_package
104110
remote: /app/.heroku/src/gunicorn
111+
remote: /tmp/build_.*/local_package
105112
remote:
106113
remote: ==> .heroku/python/lib/python.*/site-packages/gunicorn.egg-link <==
107114
remote: /app/.heroku/src/gunicorn
@@ -113,11 +120,11 @@
113120
remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.0\\)
114121
remote: -----> Inline app detected
115122
remote: ==> .heroku/python/lib/python.*/site-packages/distutils-precedence.pth <==
116-
remote: .*
123+
remote: import os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get\\(var, 'stdlib'\\) == 'local'; enabled and __import__\\('_distutils_hack'\\).add_shim\\(\\);
117124
remote:
118125
remote: ==> .heroku/python/lib/python.*/site-packages/easy-install.pth <==
119-
remote: /tmp/build_.*/local_package
120126
remote: /app/.heroku/src/gunicorn
127+
remote: /tmp/build_.*/local_package
121128
remote:
122129
remote: ==> .heroku/python/lib/python.*/site-packages/gunicorn.egg-link <==
123130
remote: /app/.heroku/src/gunicorn
@@ -132,11 +139,11 @@
132139
# Test rewritten paths work at runtime.
133140
expect(app.run('bin/test-entrypoints')).to match(Regexp.new(<<~REGEX))
134141
==> .heroku/python/lib/python.*/site-packages/distutils-precedence.pth <==
135-
.*
142+
import os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get\\(var, 'stdlib'\\) == 'local'; enabled and __import__\\('_distutils_hack'\\).add_shim\\(\\);
136143
137144
==> .heroku/python/lib/python.*/site-packages/easy-install.pth <==
138-
/app/local_package
139145
/app/.heroku/src/gunicorn
146+
/app/local_package
140147
141148
==> .heroku/python/lib/python.*/site-packages/gunicorn.egg-link <==
142149
/app/.heroku/src/gunicorn
@@ -148,14 +155,25 @@
148155
Running entrypoint for the VCS package: gunicorn \\(version 20.1.0\\)
149156
REGEX
150157

151-
# Test that the cached .pth files work correctly.
158+
# Test restoring paths in the cached .pth files works correctly.
152159
app.commit!
153160
app.push!
154161
expect(clean_output(app.output)).to match(Regexp.new(<<~REGEX))
155-
remote: Successfully installed gunicorn-20.1.0 local-package-0.0.1
162+
remote: -----> No change in requirements detected, installing from cache
163+
remote: -----> Using cached install of python-#{DEFAULT_PYTHON_VERSION}
164+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
165+
remote: -----> Installing SQLite3
166+
remote: -----> Installing requirements with pip
167+
remote: Obtaining file:///tmp/build_.*/local_package \\(from -r /tmp/build_.*/requirements.txt \\(line 1\\)\\)
168+
remote: Obtaining gunicorn from git\\+https://github.com/benoitc/gunicorn@20.1.0#egg=gunicorn \\(from -r /tmp/build_.*/requirements.txt \\(line 2\\)\\)
169+
remote: Cloning https://github.com/benoitc/gunicorn \\(to revision 20.1.0\\) to /app/.heroku/src/gunicorn
170+
remote: Installing collected packages: gunicorn, local-package
171+
remote: Running setup.py develop for gunicorn
172+
remote: Running setup.py develop for local-package
173+
remote: Successfully installed gunicorn local-package
156174
remote: -----> Running post-compile hook
157175
remote: ==> .heroku/python/lib/python.*/site-packages/distutils-precedence.pth <==
158-
remote: .*
176+
remote: import os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get\\(var, 'stdlib'\\) == 'local'; enabled and __import__\\('_distutils_hack'\\).add_shim\\(\\);
159177
remote:
160178
remote: ==> .heroku/python/lib/python.*/site-packages/easy-install.pth <==
161179
remote: /app/.heroku/src/gunicorn
@@ -171,7 +189,7 @@
171189
remote: Running entrypoint for the VCS package: gunicorn \\(version 20.1.0\\)
172190
remote: -----> Inline app detected
173191
remote: ==> .heroku/python/lib/python.*/site-packages/distutils-precedence.pth <==
174-
remote: .*
192+
remote: import os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get\\(var, 'stdlib'\\) == 'local'; enabled and __import__\\('_distutils_hack'\\).add_shim\\(\\);
175193
remote:
176194
remote: ==> .heroku/python/lib/python.*/site-packages/easy-install.pth <==
177195
remote: /app/.heroku/src/gunicorn

spec/hatchet/pipenv_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
remote: -----> Using Python version specified in Pipfile.lock
1212
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
1313
remote: -----> Installing python-#{python_version}
14-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
14+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
1515
remote: -----> Installing dependencies with Pipenv 2020.11.15
1616
remote: Installing dependencies from Pipfile.lock \\(.*\\)...
1717
remote: -----> Installing SQLite3
@@ -33,7 +33,7 @@
3333
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
3434
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
3535
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
36-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
36+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
3737
remote: -----> Installing dependencies with Pipenv 2020.11.15
3838
remote: Installing dependencies from Pipfile...
3939
remote: -----> Installing SQLite3
@@ -53,7 +53,7 @@
5353
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
5454
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
5555
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
56-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
56+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
5757
remote: -----> Installing dependencies with Pipenv 2020.11.15
5858
remote: Installing dependencies from Pipfile.lock \\(aad8b1\\)...
5959
remote: -----> Installing SQLite3
@@ -76,7 +76,7 @@
7676
remote: Learn More: https://devcenter.heroku.com/articles/python-2-7-eol-faq
7777
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
7878
remote: -----> Installing python-#{LATEST_PYTHON_2_7}
79-
remote: -----> Installing pip 20.3.4, setuptools 44.1.1 and wheel 0.37.0
79+
remote: -----> Installing pip 20.2.4, setuptools 44.1.1 and wheel 0.37.0
8080
remote: -----> Installing dependencies with Pipenv 2020.11.15
8181
remote: Installing dependencies from Pipfile.lock \\(b8efa9\\)...
8282
remote: -----> Installing SQLite3
@@ -153,7 +153,7 @@
153153
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
154154
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
155155
remote: -----> Installing python-3.9.1
156-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
156+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
157157
remote: -----> Installing dependencies with Pipenv 2020.11.15
158158
remote: Installing dependencies from Pipfile.lock \\(e13df1\\)...
159159
remote: -----> Installing SQLite3
@@ -203,7 +203,7 @@
203203
remote: -----> Using Python version specified in runtime.txt
204204
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
205205
remote: -----> Installing python-#{LATEST_PYTHON_3_9}
206-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
206+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
207207
remote: -----> Installing dependencies with Pipenv 2020.11.15
208208
remote: Installing dependencies from Pipfile.lock \\(75eae0\\)...
209209
remote: -----> Installing SQLite3
@@ -221,7 +221,7 @@
221221
remote: -----> Python app detected
222222
remote: -----> Using Python version specified in Pipfile.lock
223223
remote: -----> Installing python-#{LATEST_PYTHON_3_9}
224-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
224+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
225225
remote: -----> Installing dependencies with Pipenv 2020.11.15
226226
remote: Installing dependencies from Pipfile.lock (ef68d1)...
227227
remote: -----> Installing SQLite3
@@ -241,7 +241,7 @@
241241
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
242242
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
243243
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
244-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
244+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
245245
remote: -----> Installing dependencies with Pipenv 2020.11.15
246246
remote: Your Pipfile.lock \\(aad8b1\\) is out of date. Expected: \\(ef68d1\\).
247247
remote: \\[DeployException\\]: .*

spec/hatchet/python_version_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
remote: -----> Python app detected
1010
remote: -----> Using Python version specified in runtime.txt
1111
remote: -----> Installing python-#{python_version}
12-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
12+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
1313
remote: -----> Installing SQLite3
1414
remote: -----> Installing requirements with pip
1515
remote: Collecting urllib3
@@ -89,7 +89,7 @@
8989
remote: ! Python 2 has reached its community EOL. Upgrade your Python runtime to maintain a secure application as soon as possible.
9090
remote: Learn More: https://devcenter.heroku.com/articles/python-2-7-eol-faq
9191
remote: -----> Installing python-#{LATEST_PYTHON_2_7}
92-
remote: -----> Installing pip 20.3.4, setuptools 44.1.1 and wheel 0.37.0
92+
remote: -----> Installing pip 20.2.4, setuptools 44.1.1 and wheel 0.37.0
9393
remote: -----> Installing SQLite3
9494
remote: -----> Installing requirements with pip
9595
remote: Collecting urllib3
@@ -151,7 +151,7 @@
151151
remote: -----> Python app detected
152152
remote: -----> Using Python version specified in runtime.txt
153153
remote: -----> Installing python-#{LATEST_PYTHON_3_5}
154-
remote: -----> Installing pip 20.3.4, setuptools 50.3.2 and wheel 0.37.0
154+
remote: -----> Installing pip 20.2.4, setuptools 50.3.2 and wheel 0.37.0
155155
remote: -----> Installing SQLite3
156156
remote: -----> Installing requirements with pip
157157
remote: Collecting urllib3
@@ -208,7 +208,7 @@
208208
remote: -----> Python app detected
209209
remote: -----> Using Python version specified in runtime.txt
210210
remote: -----> Installing pypy2.7-#{LATEST_PYPY_2_7}
211-
remote: -----> Installing pip 20.3.4, setuptools 44.1.1 and wheel 0.37.0
211+
remote: -----> Installing pip 20.2.4, setuptools 44.1.1 and wheel 0.37.0
212212
remote: -----> Installing SQLite3
213213
remote: -----> Installing requirements with pip
214214
remote: Collecting urllib3
@@ -227,7 +227,7 @@
227227
remote: -----> Python app detected
228228
remote: -----> Using Python version specified in runtime.txt
229229
remote: -----> Installing pypy3.6-#{LATEST_PYPY_3_6}
230-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
230+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
231231
remote: -----> Installing SQLite3
232232
remote: -----> Installing requirements with pip
233233
remote: Collecting urllib3
@@ -270,7 +270,7 @@
270270
remote: -----> Python version has changed from python-#{LATEST_PYTHON_3_6} to python-#{LATEST_PYTHON_3_9}, clearing cache
271271
remote: -----> No change in requirements detected, installing from cache
272272
remote: -----> Installing python-#{LATEST_PYTHON_3_9}
273-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
273+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
274274
remote: -----> Installing SQLite3
275275
remote: -----> Installing requirements with pip
276276
remote: Collecting urllib3

spec/hatchet/stack_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
remote: -----> Stack has changed from heroku-18 to heroku-20, clearing cache
3030
remote: -----> No change in requirements detected, installing from cache
3131
remote: -----> Installing python-3.6.12
32-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
32+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
3333
remote: -----> Installing SQLite3
3434
remote: -----> Installing requirements with pip
3535
remote: Collecting urllib3
@@ -58,7 +58,7 @@
5858
remote: -----> Stack has changed from heroku-20 to heroku-18, clearing cache
5959
remote: -----> No change in requirements detected, installing from cache
6060
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
61-
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
61+
remote: -----> Installing pip 20.2.4, setuptools 57.5.0 and wheel 0.37.0
6262
remote: -----> Installing SQLite3
6363
remote: -----> Installing requirements with pip
6464
remote: Collecting urllib3

0 commit comments

Comments
 (0)