diff --git a/news/5273.bugfix.rst b/news/5273.bugfix.rst new file mode 100644 index 0000000000..93e8fad698 --- /dev/null +++ b/news/5273.bugfix.rst @@ -0,0 +1 @@ +Fix issue where unnamed constraints were provided but which are not allowed by ``pip`` resolver. diff --git a/pipenv/utils/dependencies.py b/pipenv/utils/dependencies.py index a9990995d0..c23582660d 100644 --- a/pipenv/utils/dependencies.py +++ b/pipenv/utils/dependencies.py @@ -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