diff --git a/CHANGELOG.md b/CHANGELOG.md index a76d23101..f74d8fd32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Downgrade pipenv from 2023.2.18 to 2023.2.4 ([#1425](https://github.com/heroku/heroku-buildpack-python/pull/1425)). ## v228 (2023-02-21) diff --git a/bin/steps/pipenv b/bin/steps/pipenv index 5600ac5bc..f29c23b5e 100755 --- a/bin/steps/pipenv +++ b/bin/steps/pipenv @@ -42,7 +42,7 @@ if [ ! "$SKIP_PIPENV_INSTALL" ]; then mcount "buildvar.PIP_EXTRA_INDEX_URL" fi - PIPENV_VERSION='2023.2.18' + PIPENV_VERSION='2023.2.4' /app/.heroku/python/bin/pip install --quiet --disable-pip-version-check --no-cache-dir "pipenv==${PIPENV_VERSION}" diff --git a/spec/hatchet/pipenv_spec.rb b/spec/hatchet/pipenv_spec.rb index aad9a8549..f10733893 100644 --- a/spec/hatchet/pipenv_spec.rb +++ b/spec/hatchet/pipenv_spec.rb @@ -2,7 +2,7 @@ require_relative '../spec_helper' -PIPENV_VERSION = '2023.2.18' +PIPENV_VERSION = '2023.2.4' RSpec.shared_examples 'builds using Pipenv with the requested Python version' do |python_version| it "builds with Python #{python_version}" do @@ -327,6 +327,27 @@ end end + context 'when Pipfile.lock is unchanged since the last build' do + let(:app) { Hatchet::Runner.new('spec/fixtures/pipenv_python_version_unspecified') } + + it 're-uses packages from the cache' do + app.deploy do |app| + app.commit! + app.push! + 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-#{DEFAULT_PYTHON_VERSION} + remote: To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes + remote: -----> Using cached install of python-#{DEFAULT_PYTHON_VERSION} + remote: -----> Installing pip #{PIP_VERSION}, setuptools #{SETUPTOOLS_VERSION} and wheel #{WHEEL_VERSION} + remote: Skipping installation, as Pipfile.lock hasn't changed since last deploy. + remote: -----> Installing SQLite3 + remote: -----> Discovering process types + OUTPUT + end + end + end + context 'when there is both a Pipfile.lock and a requirements.txt' do let(:app) { Hatchet::Runner.new('spec/fixtures/pipenv_and_requirements_txt') }