Here is one that is more complete:

Using a really simple requirement set that will not work:

$ cat test.txt

Running the above gist on that (and waiting for a while; since it does do a lot of backtracking and trying of different versions....) the program will eventually break with something like the following:

The above can likely be optimized more (to avoid diving into requirements that have already failed being selected) but it does seem to work as a satisfiability solver that will recursively check requirements deeply and try as many solutions as possible (with backtracking when a requirement is selected that doesn't work).


Joshua Harlow wrote:
Seems like a simple fix?

Make a new session somewhere in that gist/code and profit?

Kevin L. Mitchell wrote:
On Wed, 2015-01-21 at 18:48 -0800, Joshua Harlow wrote:
Another thing that I just started whipping together:

One problem, though, is that parse_requirements() now requires the
session keyword argument. In version 6.0.6, parse_requirements() begins

def parse_requirements(filename, finder=None, comes_from=None,
if session is None:
raise TypeError(
"parse_requirements() missing 1 required keyword argument: "

OpenStack Development Mailing List (not for usage questions)

Reply via email to