Skip to content

Commit

Permalink
Update PyPIRepository::resolve_reqs() for pip>=22.1.1 (#1624)
Browse files Browse the repository at this point in the history
  • Loading branch information
m000 committed May 23, 2022
1 parent b26bf62 commit 8813628
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion piptools/repositories/pypi.py
Expand Up @@ -189,7 +189,12 @@ def resolve_reqs(

reqset = RequirementSet()
ireq.user_supplied = True
reqset.add_requirement(ireq)
if PIP_VERSION[:3] < (22, 1, 1):
reqset.add_requirement(ireq)
elif getattr(ireq, "name", None):
reqset.add_named_requirement(ireq)
else:
reqset.add_unnamed_requirement(ireq)

resolver = self.command.make_resolver(
preparer=preparer,
Expand Down

0 comments on commit 8813628

Please sign in to comment.