- Fix calls to opaque objects and use provider interface calls instead. #126
- Implement backjumping to significantly speed up the resolution process by skipping over irrelevant parts of the resolution search space. #113
- A new reporter hook
rejecting_candidate
is added, replacingbacktracking
. The hook is called every time the resolver rejects a conflicting candidate before trying out the next one in line. #101
- Some valid states that were previously rejected are now accepted. This affects
states where multiple candidates for the same dependency conflict with each
other. The
information
argument passed toAbstractProvider.get_preference
may now contain empty iterators. This has always been allowed by the method definition but it was previously not possible in practice. #91
- A new reporter hook
resolving_conflicts
is added. The resolver triggers this hook when it detects conflicts in the dependency tree, and before it attempts to fix them. The hook accepts one single argumentcauses
, which is a list of(requirement, parent)
2-tuples that represents all the edges that lead to the detected conflicts. #81
- Add
backtrack_causes
toget_preference
, which contains information about the requirements involved in the most recent backtrack. This allows the provider to utilise this information to tweak the ordering as well as for recording/reporting conflicts.
- When merging a candidate's dependencies, make sure the merge target is
up-to-date within the loop, so the merge does not lose information when a
candidate returns multiple dependency specifications under one identifier
(e.g. specifyiung two dependencies
a>1
anda<2
, instead of one singlea>1,<2
dependency). #80
- Redesign
get_preference()
to include resolution state on dependencies other than the currently working one, to allow the provider to better take account of the global resolver knowledge and determine the best strategy. The provider now can, for example, correctly calculate how far a dependency is from the root node in the graph. #74
- A new argument
incompatibilities
is now passed to thefind_matches()
hook, which the provider must use to exclude matches from the return value. #68 - Redesign
find_matches()
to include resolution state on dependencies other than the currently working one, to handle usages that need to return candidates based on non-local states. One such example is PEP 508 direct URLs specified on a package, which need to be available to the same package specified with extras (which would have a different identifier). #74
- The resolver no longer relies on implicit candidate equality to detect
incompatibilities. This is done by an additional
find_matches()
argument; see the Features section to learn more. #68
- Provide type stubs for most classes. #72
No significant changes.
- Fix a state management bug that causes the resolver to enter an infinite loop in certain backtracking cases. #62
- Fix a performance regression if
find_matches()
returns a non-built-in sequence instance.
find_matches()
now may return aCallable[[], Iterator[Candidate]]
to avoid needing to provide all candidates eagerly for the resolver. This improves performance when fetching candidates is costly, but not always required. #57
- Add
parent
argument to theadd_requirement()
reporter hook. #46 - Redesign
find_matches()
to support a requirement "adding" candidates to the set, and nudge the provider away from implementingfind_matches()
andis_satisfied_by()
with incorrect set properties. #49
- Provide both the requirements and their parents as exceptiondata for the
ResolutionImpossible
exception, via acauses
attribute that replaces the previousrequirements
attribute. #42
- Make resolver backtrack when none of the candidates requested for a package are able to resolve due to them requesting unworkable requirements, or a package has no candidates at all. Previously the resolver would give up on the spot. #18
- Ensure the result returned by the resolver only contains candidates that are actually needed. This is done by tracing the graph after resolution completes, snipping nodes that don’t have a route to the root. #4
- Remove reporting callbacks adding_requirements, adding_candidate, and replacing_candidate added in 0.2.1. These are not useful, and it’s better to remove them while we can. #6
- Add new reporting callbacks adding_requirements, adding_candidate, and replacing_candidate to report progress in requirement pinning. #2
- Fix missing edges in the resolved dependency graph caused by incorrectly copying stale constraint and parent-child information. #5
Resolver.resolve()
now returns a namedtuple with public attributes, instead of an internal Resolution object.- Update trove classifiers on PyPI to better reflect the project's intentions.