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

pipenv ignores version constraint without == #4971

Open
rittneje opened this issue Feb 24, 2022 · 7 comments
Open

pipenv ignores version constraint without == #4971

rittneje opened this issue Feb 24, 2022 · 7 comments
Labels
hacktoberfest Type: Possible Bug This issue describes a possible bug in pipenv.

Comments

@rittneje
Copy link

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.

@matteius
Copy link
Member

I see what you mean, yeah that should be seen as invalid I think.

@matteius matteius added the Type: Possible Bug This issue describes a possible bug in pipenv. label Feb 24, 2022
@dojutsu-user
Copy link
Contributor

Hi @matteius,
Taking this up. I believe the fix will in sarugaku/requirementslib repository.. right?

@matteius
Copy link
Member

@dojutsu-user that sounds accurate.

@dojutsu-user
Copy link
Contributor

Hi @matteius,
Can you provide some guidance on where to look. I am not able to find the exact code in the repo for this.

@dojutsu-user
Copy link
Contributor

Hi @matteius,
Can you guide me here a little bit.

@matteius
Copy link
Member

@dojutsu-user I honestly haven't thought it through yet -- Perhaps look for where requirementslib is using Constraint but I may not have time to look at this more closely until probably next weekend.

@matteius
Copy link
Member

Can this issue be rechecked with pipenv==2023.8.26?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Type: Possible Bug This issue describes a possible bug in pipenv.
Projects
None yet
Development

No branches or pull requests

3 participants