Skip to content

Require a Pipfile.lock when using Pipenv#1833

Merged
edmorley merged 1 commit intomainfrom
pipenv-lockfile-mandatory
Jul 15, 2025
Merged

Require a Pipfile.lock when using Pipenv#1833
edmorley merged 1 commit intomainfrom
pipenv-lockfile-mandatory

Conversation

@edmorley
Copy link
Copy Markdown
Member

For historical reasons, the buildpack has supported using the package manager Pipenv without a lockfile. However, doing so results in non-deterministic installs (package versions can vary across environments) and so is unsafe / not recommended.

As such, since #1695 in November 2024, we've shown a deprecation warning if apps have only a Pipfile and no Pipfile.lock file.

Plenty of time has now passed, and metrics show usage very few apps hitting this warning. In addition, upstream Pipenv has also deprecated support for --skip-lock:
pypa/pipenv@8775d59

As such, it's time to change this warning to an error.

Affected apps will need to run pipenv lock and commit the resultant Pipfile.lock to Git.

Closes #1702.
GUS-W-17308738.

For historical reasons, the buildpack has supported using the package
manager Pipenv without a lockfile. However, doing so results in
non-deterministic installs (package versions can vary across
environments) and so is unsafe / not recommended.

As such, since #1695 in November 2024, we've shown a deprecation warning
if apps have only a `Pipfile` and no `Pipfile.lock` file.

Plenty of time has now passed, and metrics show usage very few apps
hitting this warning. In addition, upstream Pipenv has also
deprecated support for `--skip-lock`:
pypa/pipenv@8775d59

As such, it's time to change this warning to an error.

Affected apps will need to run `pipenv lock` and commit the resultant
`Pipfile.lock` to Git.

Closes #1702.
GUS-W-17308738.
@edmorley edmorley self-assigned this Jul 15, 2025
@edmorley edmorley marked this pull request as ready for review July 15, 2025 11:42
@edmorley edmorley requested a review from a team as a code owner July 15, 2025 11:42
@edmorley edmorley merged commit cf11b63 into main Jul 15, 2025
9 of 10 checks passed
@edmorley edmorley deleted the pipenv-lockfile-mandatory branch July 15, 2025 12:04
@heroku-linguist heroku-linguist bot mentioned this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Pipfile.lock mandatory when using Pipenv

2 participants