Skip to content

Commit

Permalink
Do not consider constrants when checking for equality of direct origi…
Browse files Browse the repository at this point in the history
…n dependencies
  • Loading branch information
Jinior committed Jun 24, 2022
1 parent 4f9c352 commit 63681df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/poetry/core/packages/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,9 @@ def __eq__(self, other: object) -> bool:
if not isinstance(other, Dependency):
return NotImplemented

return super().__eq__(other) and self._constraint == other.constraint
return super().__eq__(other) and (
self._constraint == other.constraint or self.is_direct_origin()
)

def __hash__(self) -> int:
# don't include _constraint in hash because it is mutable!
Expand Down

0 comments on commit 63681df

Please sign in to comment.