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

Replace pipenv lock with pipenv upgrade #8312

Merged
merged 4 commits into from
Nov 2, 2023

Conversation

deivid-rodriguez
Copy link
Contributor

The pipenv lock command had several problems:

  • It upgrades all versions to the latest version, not just the
    dependency being upgraded. This required us to explicitly pin all top
    level dependencies to prevent them from being upgraded, and even so,
    we'd still give incorrect results sometimes, when unrelated transitive
    dependencies would also get unintendedly upgraded.

  • It not only resolved versions, but also installed packags, with the
    potential problems like missing OS dependencies associated with that.

Closes #6836.

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/pipenv-upgrade branch 3 times, most recently from 3cf8eca to 1f7247a Compare November 1, 2023 13:41
@deivid-rodriguez
Copy link
Contributor Author

deivid-rodriguez commented Nov 1, 2023

This smoke test failure is a bug/missing feature in pipenv: pypa/pipenv#6002.

It's really not a big deal, so for now we can update the smoke test with the lockfile that we generate now.

This means no spaces, and at least one operator.

We'll need this for migrating to using `pipenv upgrade` under the hood,
because we'll want to pass the specifier inline to pipenv like

```
pipenv upgrade <name><specifier>
```

and that breaks if it has spaces.
The `pipenv lock` command had several problems:

* It upgrades all versions to the latest version, not just the
  dependency being upgraded. This required us to explicitly pin all top
  level dependencies to prevent them from being upgraded, and even so,
  we'd still give incorrect results sometimes, when unrelated transitive
  dependencies would also get unintendedly upgraded.

* It not only resolved versions, but also installed packags, with the
  potential problems like missing OS dependencies associated with that.
@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review November 2, 2023 13:00
@deivid-rodriguez deivid-rodriguez requested a review from a team as a code owner November 2, 2023 13:00
@deivid-rodriguez deivid-rodriguez merged commit c947610 into main Nov 2, 2023
80 checks passed
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/pipenv-upgrade branch November 2, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to leveraging pipenv's new pipenv upgrade command
2 participants