Skip to content

pipenv ignores version constraint without == #4971

Open
@rittneje

Description

@rittneje

This is with the latest release (2022.1.8).

Issue description

If you try to pin to a version, but neglect to include ==, then pipenv ignores the constraint entirely. It is a common misunderstanding to assume they would be equivalent. (And in fact I think pipenv is wrong for not treating them so.)

For example, requests = "2.23.0" will install latest instead.

Expected result

Either requests = "2.23.0" should be treated as requests = "==2.23.0", or pipenv install should fail saying that the Pipfile is invalid.

Actual result

It silently installed requests 2.27.1 (current latest) instead.

Steps to replicate

Add requests = "2.23.0" to the packages section and run pipenv install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions