diff --git a/CHANGELOG.md b/CHANGELOG.md index 1de8180b7..599ab379c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ when `--allow-unsafe` was not set. ([#517](https://github.com/jazzband/pip-tools (thus losing their VCS directory) and `python setup.py egg_info` fails. ([#385](https://github.com/jazzband/pip-tools/pull/385#) and [#538](https://github.com/jazzband/pip-tools/pull/538)). Thanks @blueyed and @dfee - Fixed bug where some primary dependencies were annotated with "via" info comments. ([#542](https://github.com/jazzband/pip-tools/pull/542)). Thanks @quantus - Fixed bug where pkg-resources would be removed by pip-sync in Ubuntu. ([#555](https://github.com/jazzband/pip-tools/pull/555)). Thanks @cemsbr +- Fixed bug where the resolver would sometime not stabilize on requirements specifying extras. ([#566](https://github.com/jazzband/pip-tools/pull/566)). Thanks @vphilippon # 1.9.0 (2017-04-12) diff --git a/piptools/resolver.py b/piptools/resolver.py index 7ed8c5319..3995e66fa 100644 --- a/piptools/resolver.py +++ b/piptools/resolver.py @@ -32,11 +32,11 @@ class RequirementSummary(object): """ Summary of a requirement's properties for comparison purposes. """ - def __init__(self, req): - self.req = req - self.key = key_from_req(req) - self.extras = str(sorted(req.extras)) - self.specifier = str(req.specifier) + def __init__(self, ireq): + self.req = ireq.req + self.key = key_from_req(ireq.req) + self.extras = str(sorted(ireq.extras)) + self.specifier = str(ireq.specifier) def __eq__(self, other): return str(self) == str(other) @@ -210,11 +210,11 @@ def _resolve_one_round(self): # NOTE: We need to compare RequirementSummary objects, since # InstallRequirement does not define equality - diff = {RequirementSummary(t.req) for t in theirs} - {RequirementSummary(t.req) for t in self.their_constraints} - removed = ({RequirementSummary(t.req) for t in self.their_constraints} - - {RequirementSummary(t.req) for t in theirs}) - unsafe = ({RequirementSummary(t.req) for t in unsafe_constraints} - - {RequirementSummary(t.req) for t in self.unsafe_constraints}) + diff = {RequirementSummary(t) for t in theirs} - {RequirementSummary(t) for t in self.their_constraints} + removed = ({RequirementSummary(t) for t in self.their_constraints} - + {RequirementSummary(t) for t in theirs}) + unsafe = ({RequirementSummary(t) for t in unsafe_constraints} - + {RequirementSummary(t) for t in self.unsafe_constraints}) has_changed = len(diff) > 0 or len(removed) > 0 or len(unsafe) > 0 if has_changed: