I’m going to work toward 0.6.0, which is going to contain several breaking changes. This post serves both as a heads-up and summary to myself so I don’t forget something or have to add new things at the last minute.
Keyword arguments
All Provider and Reporter methods will be called with keyword arguments from now on. This means you can start adding **kwargs for future compatibility now.
The current requirements: List[Requirement] can be replaced by requirements[identifier]. The new incompatibilities argument provides incompatible candidates already known to the resolver. The provider must exclude them from the result.
Identifier is the return type of identify. Criterion is the same as in Result.
Old get_preference() arguments can be replaced by:
resolution: resolutions.get(identifier).
candidates: candidates[identifier].candidates is an abstraction around the return value of find_matches(). It implements the equence protocol if you returned a list from find_matches(). Otherwise, it is an iterable container.
I’m going to work toward 0.6.0, which is going to contain several breaking changes. This post serves both as a heads-up and summary to myself so I don’t forget something or have to add new things at the last minute.
Keyword arguments
All Provider and Reporter methods will be called with keyword arguments from now on. This means you can start adding
**kwargs
for future compatibility now.find_matches
argument changesThe current
requirements: List[Requirement]
can be replaced byrequirements[identifier]
. The newincompatibilities
argument provides incompatible candidates already known to the resolver. The provider must exclude them from the result.get_preference
argument changesIdentifier
is the return type ofidentify
.Criterion
is the same as inResult
.Old
get_preference()
arguments can be replaced by:resolution
:resolutions.get(identifier)
.candidates
:candidates[identifier].candidates
is an abstraction around the return value offind_matches()
. It implements the equence protocol if you returned a list fromfind_matches()
. Otherwise, it is an iterable container.information
:criteria[identifier].information
.