You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often dependencies versions are defined with a minimum and a maximum, with foobarlib>=1.0.0,<2 or foobarlib=^1.0.0. However when tox or GHA (or other similar tools) install a project to run unit tests, pip installs the most recent possible version (if we ignore version incompatibility issues).
Generally, minimum versions of dependencies are not tested, and pip provide no easy way to install foobar>=1.0.0 so a CI pipeline can check if that version is really still supported.
Describe the solution you'd like
The simplest thing I can think of from a user perspective would be a --minimum-versions option to pip install that would install the oldest version possible.
Alternative Solutions
The workaround is to run sed in the CI to replace >=x.y.z by ==x.y.z and ^x.y.z by ==x.y.z in setup.cfg/pyproject.toml files.
This is not ideal because the regex can easily break, sed might have different behavior depending on the platform, that workaround is cumbersome to run locally.
What's the problem this feature will solve?
Often dependencies versions are defined with a minimum and a maximum, with
foobarlib>=1.0.0,<2
orfoobarlib=^1.0.0
. However when tox or GHA (or other similar tools) install a project to run unit tests, pip installs the most recent possible version (if we ignore version incompatibility issues).Generally, minimum versions of dependencies are not tested, and
pip
provide no easy way to installfoobar>=1.0.0
so a CI pipeline can check if that version is really still supported.Describe the solution you'd like
The simplest thing I can think of from a user perspective would be a
--minimum-versions
option topip install
that would install the oldest version possible.Alternative Solutions
The workaround is to run
sed
in the CI to replace>=x.y.z
by==x.y.z
and^x.y.z
by==x.y.z
in setup.cfg/pyproject.toml files.This is not ideal because the regex can easily break, sed might have different behavior depending on the platform, that workaround is cumbersome to run locally.
Additional context
As an example, ihatemoney implements the sed workaround.
Code of Conduct
The text was updated successfully, but these errors were encountered: