You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Pipenv to 2025.0.4 and improve installation/caching (#1840)
* Updates Pipenv from 2024.0.1 to 2025.0.4. Changelog:
https://github.com/pypa/pipenv/blob/main/CHANGELOG.md#202504-2025-07-07
* Switches to installing Pipenv into its own virtual environment, so
that it and its dependencies don't leak into the app environment.
* Stops installing pip (in addition to Pipenv) when the chosen package
manager is Pipenv, to match the behaviour when using Poetry or uv.
* Forces the build cache to be cleared if the contents of `Pipfile.lock`
has changed since the last build. This is required to work around
`pipenv {install,sync}` by design not uninstalling packages if they
are removed from the lockfile (?!). We also can't use `pipenv clean`
since it doesn't work with `--system` / `PIPENV_SYSTEM`.
Apps that have been inadvertently depending on Pipenv's own dependencies
implicitly, will need to add those dependencies explicitly to their
`Pipfile` and regenerate `Pipfile.lock`. Similarly, any apps that for
some reason use pip later in the build in addition to Pipenv, will need
to either add pip as an explicit dependency in their `Pipfile`, or else
for adhoc use-cases (such as in one-off dynos), can temporarily install
pip using `python -m ensurepip --default-pip`.
Supersedes #1828.
GUS-W-17482289.
GUS-W-17482412.
GUS-W-19116903.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
## [Unreleased]
4
4
5
+
- Updated Pipenv from 2024.0.1 to 2025.0.4. ([#1840](https://github.com/heroku/heroku-buildpack-python/pull/1840))
6
+
- Fixed the way Pipenv is installed, so that it and its dependencies are installed into a separate virtual environment rather than same environment as the app. If your app inadvertently depended on Pipenv's internal dependencies, you will need to add those dependencies explicitly to your `Pipfile`. ([#1840](https://github.com/heroku/heroku-buildpack-python/pull/1840))
7
+
- Stopped installing pip when Pipenv is the chosen package manager. ([#1840](https://github.com/heroku/heroku-buildpack-python/pull/1840))
8
+
- The build cache is now cleared when using Pipenv if the contents of `Pipfile.lock` has changed since the last build. This is required to work around Pipenv not uninstalling packages when they are removed from the lockfile. ([#1840](https://github.com/heroku/heroku-buildpack-python/pull/1840))
5
9
- The build now errors when using Pipenv without its lockfile (`Pipfile.lock`). This replaces the warning displayed since November 2024. ([#1833](https://github.com/heroku/heroku-buildpack-python/pull/1833))
0 commit comments