Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to install the oldest available versions of dependencies #12344

Closed
1 task done
azmeuk opened this issue Oct 12, 2023 · 1 comment
Closed
1 task done

Add an option to install the oldest available versions of dependencies #12344

azmeuk opened this issue Oct 12, 2023 · 1 comment
Labels
resolution: duplicate Duplicate of an existing issue/PR

Comments

@azmeuk
Copy link

azmeuk commented Oct 12, 2023

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 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.

Additional context

As an example, ihatemoney implements the sed workaround.

Code of Conduct

@azmeuk azmeuk added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Oct 12, 2023
@uranusjr
Copy link
Member

Duplicate of #8085

@uranusjr uranusjr marked this as a duplicate of #8085 Oct 13, 2023
@uranusjr uranusjr closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2023
@uranusjr uranusjr added resolution: duplicate Duplicate of an existing issue/PR and removed type: feature request Request for a new feature S: needs triage Issues/PRs that need to be triaged labels Oct 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants