Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pip to 22.0.4, setuptools to 60.10.0 and wheel to 0.37.1 #1310

Merged
merged 1 commit into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
- Fix typo in the `BUILD_WITH_GEO_LIBRARIES` end-of-life error message ([#1307](https://github.com/heroku/heroku-buildpack-python/pull/1307)).
- No longer set a fallback value for `$STACK`, since it is always set on Heroku ([#1308](https://github.com/heroku/heroku-buildpack-python/pull/1308)).
- Adjust the configure options and packaging process for Python 3.7 releases, to enable loadable extensions in the `_sqlite` module, and to remove the `idle_test` module ([#1309](https://github.com/heroku/heroku-buildpack-python/pull/1309)). This change will only take effect as of the next Python 3.7 release (3.7.14).
- Update pip from 21.3.1 to 22.0.4 for Python 3.7+ ([#1310](https://github.com/heroku/heroku-buildpack-python/pull/1310))
- Update setuptools from 57.5.0 to: ([#1310](https://github.com/heroku/heroku-buildpack-python/pull/1310))
- 59.6.0 for Python 3.6
- 60.10.0 for Python 3.7+
- Update wheel from 0.37.0 to 0.37.1 for Python 2.7 and Python 3.5+ ([#1310](https://github.com/heroku/heroku-buildpack-python/pull/1310))

## v209 (2022-03-24)

Expand Down Expand Up @@ -52,7 +57,7 @@
- Update setuptools from 47.1.1 to: ([#1254](https://github.com/heroku/heroku-buildpack-python/pull/1254))
- 50.3.2 for Python 3.5
- 57.5.0 for Python 3.6+
- Update wheel from 0.36.2 to 0.37.0 ([#1254](https://github.com/heroku/heroku-buildpack-python/pull/1254)).
- Update wheel from 0.36.2 to 0.37.0 for Python 2.7 and Python 3.5+ ([#1254](https://github.com/heroku/heroku-buildpack-python/pull/1254)).
- Perform editable package `.pth` and `.egg-link` path rewriting at runtime ([#1252](https://github.com/heroku/heroku-buildpack-python/pull/1252)).

## v200 (2021-10-04)
Expand Down
2 changes: 1 addition & 1 deletion bin/steps/pip-install
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
exit 1
fi

/app/.heroku/python/bin/pip install -r "$BUILD_DIR/requirements.txt" --exists-action=w --src=/app/.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee "$WARNINGS_LOG" | cleanup | indent
/app/.heroku/python/bin/pip install -r "$BUILD_DIR/requirements.txt" --exists-action=w --src=/app/.heroku/src --disable-pip-version-check --no-cache-dir --progress-bar off 2>&1 | tee "$WARNINGS_LOG" | cleanup | indent
PIP_STATUS="${PIPESTATUS[0]}"
set -e

Expand Down
10 changes: 7 additions & 3 deletions bin/steps/python
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ fi

set -e

PIP_VERSION='21.3.1'
SETUPTOOLS_VERSION='57.5.0'
WHEEL_VERSION='0.37.0'
PIP_VERSION='22.0.4'
SETUPTOOLS_VERSION='60.10.0'
WHEEL_VERSION='0.37.1'

if [[ "${PYTHON_VERSION}" == ${PY34}* ]]; then
# Python 3.4 support was dropped in pip 19.2+, setuptools 44+ and wheel 0.34+.
Expand All @@ -167,6 +167,10 @@ elif [[ "${PYTHON_VERSION}" == ${PY35}* ]]; then
# Python 3.5 support was dropped in pip 21+ and setuptools 51+.
PIP_VERSION='20.3.4'
SETUPTOOLS_VERSION='50.3.2'
elif [[ "${PYTHON_VERSION}" == ${PY36}* || "${PYTHON_VERSION}" == ${PYPY36}* ]]; then
# Python 3.6 support was dropped in pip 22+ and setuptools 59.7.0+.
PIP_VERSION='21.3.1'
SETUPTOOLS_VERSION='59.6.0'
fi

puts-step "Installing pip ${PIP_VERSION}, setuptools ${SETUPTOOLS_VERSION} and wheel ${WHEEL_VERSION}"
Expand Down
6 changes: 3 additions & 3 deletions spec/hatchet/pip_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
remote: -----> No Python version was specified. Using the buildpack default: python-#{DEFAULT_PYTHON_VERSION}
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting urllib3
Expand All @@ -38,7 +38,7 @@
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> No change in requirements detected, installing from cache
remote: -----> Using cached install of python-#{DEFAULT_PYTHON_VERSION}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: -----> Discovering process types
Expand All @@ -61,7 +61,7 @@
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Requirements file has been changed, clearing cached dependencies
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting urllib3
Expand Down
31 changes: 22 additions & 9 deletions spec/hatchet/pipenv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
remote: -----> Using Python version specified in Pipfile.lock
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
remote: -----> Installing python-#{python_version}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote: Installing dependencies from Pipfile.lock \\(.*\\)...
remote: -----> Installing SQLite3
Expand All @@ -33,7 +33,7 @@
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote: Installing dependencies from Pipfile...
remote: -----> Installing SQLite3
Expand All @@ -53,7 +53,7 @@
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote: Installing dependencies from Pipfile.lock \\(aad8b1\\)...
remote: -----> Installing SQLite3
Expand All @@ -76,7 +76,7 @@
remote: Learn More: https://devcenter.heroku.com/articles/python-2-7-eol-faq
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
remote: -----> Installing python-#{LATEST_PYTHON_2_7}
remote: -----> Installing pip 20.3.4, setuptools 44.1.1 and wheel 0.37.0
remote: -----> Installing pip 20.3.4, setuptools 44.1.1 and wheel 0.37.1
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote: Installing dependencies from Pipfile.lock \\(b8efa9\\)...
remote: -----> Installing SQLite3
Expand Down Expand Up @@ -114,7 +114,20 @@
context 'with a Pipfile.lock containing python_version 3.6' do
let(:app) { Hatchet::Runner.new('spec/fixtures/pipenv_python_3.6') }

include_examples 'builds using Pipenv with the requested Python version', LATEST_PYTHON_3_6
it 'builds with the latest Python 3.6' do
app.deploy do |app|
expect(clean_output(app.output)).to match(Regexp.new(<<~REGEX))
remote: -----> Python app detected
remote: -----> Using Python version specified in Pipfile.lock
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
remote: -----> Installing python-#{LATEST_PYTHON_3_6}
remote: -----> Installing pip 21.3.1, setuptools 59.6.0 and wheel 0.37.1
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote: Installing dependencies from Pipfile.lock \\(.*\\)...
remote: -----> Installing SQLite3
REGEX
end
end
end

context 'with a Pipfile.lock containing python_version 3.7' do
Expand Down Expand Up @@ -153,7 +166,7 @@
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
remote: -----> Installing python-3.10.0
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote: Installing dependencies from Pipfile.lock \\(99d8c9\\)...
remote: -----> Installing SQLite3
Expand Down Expand Up @@ -203,7 +216,7 @@
remote: -----> Using Python version specified in runtime.txt
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
remote: -----> Installing python-#{LATEST_PYTHON_3_10}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote: Installing dependencies from Pipfile.lock \\(75eae0\\)...
remote: -----> Installing SQLite3
Expand All @@ -221,7 +234,7 @@
remote: -----> Python app detected
remote: -----> Using Python version specified in Pipfile.lock
remote: -----> Installing python-#{LATEST_PYTHON_3_10}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote: Installing dependencies from Pipfile.lock (2d32e8)...
remote: -----> Installing SQLite3
Expand All @@ -241,7 +254,7 @@
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: cp: cannot stat '/tmp/build_.*/requirements.txt': No such file or directory
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing dependencies with Pipenv 2020.11.15
remote: Your Pipfile.lock \\(aad8b1\\) is out of date. Expected: \\(2d32e8\\).
remote: \\[DeployException\\]: .*
Expand Down
27 changes: 20 additions & 7 deletions spec/hatchet/python_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: -----> Installing python-#{python_version}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting urllib3
Expand Down Expand Up @@ -89,7 +89,7 @@
remote: ! Python 2 has reached its community EOL. Upgrade your Python runtime to maintain a secure application as soon as possible.
remote: Learn More: https://devcenter.heroku.com/articles/python-2-7-eol-faq
remote: -----> Installing python-#{LATEST_PYTHON_2_7}
remote: -----> Installing pip 20.3.4, setuptools 44.1.1 and wheel 0.37.0
remote: -----> Installing pip 20.3.4, setuptools 44.1.1 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting urllib3
Expand Down Expand Up @@ -151,7 +151,7 @@
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: -----> Installing python-#{LATEST_PYTHON_3_5}
remote: -----> Installing pip 20.3.4, setuptools 50.3.2 and wheel 0.37.0
remote: -----> Installing pip 20.3.4, setuptools 50.3.2 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting urllib3
Expand All @@ -172,7 +172,20 @@
context 'when runtime.txt contains python-3.6.15' do
let(:app) { Hatchet::Runner.new('spec/fixtures/python_3.6') }

include_examples 'builds with the requested Python version', LATEST_PYTHON_3_6
it 'builds with Python 3.6.15' do
app.deploy do |app|
expect(clean_output(app.output)).to include(<<~OUTPUT)
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: -----> Installing python-#{LATEST_PYTHON_3_6}
remote: -----> Installing pip 21.3.1, setuptools 59.6.0 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting urllib3
OUTPUT
expect(app.run('python -V')).to include("Python #{LATEST_PYTHON_3_6}")
end
end
end

context 'when runtime.txt contains python-3.7.13' do
Expand Down Expand Up @@ -208,7 +221,7 @@
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: -----> Installing pypy2.7-#{LATEST_PYPY_2_7}
remote: -----> Installing pip 20.3.4, setuptools 44.1.1 and wheel 0.37.0
remote: -----> Installing pip 20.3.4, setuptools 44.1.1 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting urllib3
Expand All @@ -227,7 +240,7 @@
remote: -----> Python app detected
remote: -----> Using Python version specified in runtime.txt
remote: -----> Installing pypy3.6-#{LATEST_PYPY_3_6}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 21.3.1, setuptools 59.6.0 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting urllib3
Expand Down Expand Up @@ -270,7 +283,7 @@
remote: -----> Python version has changed from python-#{LATEST_PYTHON_3_6} to python-#{LATEST_PYTHON_3_10}, clearing cache
remote: -----> No change in requirements detected, installing from cache
remote: -----> Installing python-#{LATEST_PYTHON_3_10}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting urllib3
Expand Down
12 changes: 6 additions & 6 deletions spec/hatchet/stack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# can successfully read the stack metadata written to the build cache in the past.
# The buildpack version chosen is one which had an older default Python version, so
# we can also prove that clearing the cache didn't lose the Python version metadata.
let(:buildpacks) { ['https://github.com/heroku/heroku-buildpack-python#v189'] }
let(:buildpacks) { ['https://github.com/heroku/heroku-buildpack-python#v208'] }
let(:app) { Hatchet::Runner.new('spec/fixtures/python_version_unspecified', buildpacks: buildpacks) }

it 'clears the cache before installing again whilst preserving the sticky Python version' do
Expand All @@ -22,14 +22,14 @@
# TODO: The requirements output shouldn't say "installing from cache", since it's not.
expect(clean_output(app.output)).to include(<<~OUTPUT)
remote: -----> Python app detected
remote: -----> No Python version was specified. Using the same version as the last build: python-3.6.12
remote: -----> No Python version was specified. Using the same version as the last build: python-3.10.3
remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
remote: ! Python has released a security update! Please consider upgrading to python-#{LATEST_PYTHON_3_6}
remote: ! Python has released a security update! Please consider upgrading to python-#{LATEST_PYTHON_3_10}
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Stack has changed from heroku-18 to heroku-20, clearing cache
remote: -----> No change in requirements detected, installing from cache
remote: -----> Installing python-3.6.12
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing python-3.10.3
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting urllib3
Expand Down Expand Up @@ -59,7 +59,7 @@
remote: -----> Stack has changed from heroku-20 to heroku-18, clearing cache
remote: -----> No change in requirements detected, installing from cache
remote: -----> Installing python-#{DEFAULT_PYTHON_VERSION}
remote: -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting urllib3
Expand Down