-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Add a resolver option to use the specified minimum version for a dependency #8085
Description
What's the problem this feature will solve?
I would like to be able to install my project using its "lower bounds" requirements and run the test suite to ensure that (a) I have those lower bounds specified properly and (b) the tests pass.
Describe the solution you'd like
A new command line option --prefer-minimum-versions would change the resolver behavior to choose the earliest version supported by a requirement specification. For example if versions 1.0 and 2.0 of package foo are available and the specification is foo>=1.0 then when the flag is used version 1.0 would be installed and when the flag is not used version 2.0 would be installed.
Large applications such as OpenStack have a lot of dependencies and verifying the accuracy of the complete set is complex. Providing a way to install the earliest set of packages expected to work would make this easier.
Alternative Solutions
The existing constraints file option does help, but building a valid constraints file is complicated.
Additional context
There is a recent discussion about this need on the openstack-discuss mailing list.
I will work on the implementation.