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

Apply fix to constraints generation based on fact that pip resolver does not allow unnamed constraints. #5321

Merged
merged 1 commit into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/5273.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix issue where unnamed constraints were provided but which are not allowed by ``pip`` resolver.
2 changes: 1 addition & 1 deletion pipenv/utils/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def is_constraints(dep: InstallRequirement) -> bool:
constraints = []
for dep_name, dep in deps.items():
new_dep = Requirement.from_pipfile(dep_name, dep)
if is_constraints(new_dep.as_ireq()):
if new_dep.is_named and is_constraints(new_dep.as_ireq()):
c = new_dep.as_line().strip()
constraints.append(c)
return constraints
Expand Down