mixology icon indicating copy to clipboard operation
mixology copied to clipboard

After least versions, the package with least dependencies is chosen

Open ddelange opened this issue 4 years ago • 1 comments

This PR makes sure that first the package with least satisfying versions is chosen. If there are multiple packages with e.g. only one satisfying version, a second metric will decide the winner: the amount of dependencies of the highest satisfying version.

This way (if e.g. there are many dependencies with an exact pin), less dependencies need to be inspected before the next decision, improving solving time for big nested packages.

In my case, I'm using a PackageSource object that will on demand resolve the dependencies and available versions for a package by inspecting wheels from PyPI repositories. This adds overhead to the algorithm, but allows to start solve() with an empty (undiscovered) tree and one or more root dependencies. Getting wheels for packages with many dependencies takes a lot of time (and might be completely unnecessary if we inspect only few dependencies for a different term).

ddelange avatar Dec 20 '19 09:12 ddelange

Hi @sdispater 👋

Was going though old pulls and wanted to ask if I shall close the ones here and https://github.com/python-poetry/semver/pull/4? Are mixology and semver more or less public archive (ref https://github.com/sdispater/mixology/pull/5#issuecomment-1079659588)?

ddelange avatar Mar 26 '22 10:03 ddelange