Skip to content

Running pipenv update --dev updates transitive dependencies in develop section independently on default section #6420

@stekycz

Description

@stekycz

Issue description

I want to regularly update dependencies for my project having many packages locked to specific versions and keeping dev-packages as open as possible using * as the version. Running command pipenv update --dev (or even pipenv update --categories develop) updates some transitive packages even at major version for the develop section even though they should stay at the base version defined by the default section.

Expected result

Any category using (even transitively) the same package as the default category should remain the same as in the default category.

Actual result

The other category than default updates all packages independently on the default category resulting in version bumps (even in major versions) for development environment while keeping other version for the production environment.

Steps to replicate

Let's have a Pipfile

[packages]
requests = "==2.25.1"

[dev-packages]
types-requests = "*"

Let's resolve dependencies properly

pipenv install --dev

Notice the package urllib3 is locked at version 1.26.20

Let's check if something should get updated (not really as the lock file has been just created, right?)

pipenv update --dev

(Works the same even with pipenv update --categories develop)
Notice the package urllib3 got bumped to version 2.4.0 (or maybe even higher now) but for the develop section only.


I believe the install command works thanks to presence of resolving packages based on the default category. Unfortunately, the update command lacks such capabilities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Contributor CandidateThe issue has been identified/triaged and contributions are welcomed/encouraged.Type: Possible BugThis issue describes a possible bug in pipenv.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions