Specify minimum requirements for dependencies #13317
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Description
This PR specifies minimum allowed versions of
colorama,iniconfig, andpackaging, and bumps the minimum requirement ofexceptiongroupto no longer be a release candidate.The first draft of this PR specifies minimum allowed versions that are several years old, but these can be changed to be more recent.
Motivation
uvhas multiple dependency resolution strategies:lowestwill install the lowest allowed version for all dependencies, both direct and indirect (transitive).lowest-directwill use the lowest compatible versions for all direct dependencies, while using the latest compatible versions for all other dependencies.Up until now,
pytesthas not specified the minimum allowed versions of multiple dependencies inpyproject.toml. When I ranuv pip install pytest==8.3.5 --resolution=lowestin a fresh virtual environment, it installedpackaging==14.0(released in 2014 👀) andiniconfig==0.1(released in 2010 😅).It's a fairly common practice in the scientific pythoniverse to run tests against the oldest versions of dependencies. In practice, using
uv'slowestdependency resolution strategy results the first release of certain indirect dependencies being installed, likev0.0.0.1. Specifying lower bounds will make it a lot more practical forpytestusers to test against the oldest allowed versions of both indirect and direct dependencies.Many thanks to everyone who has contributed to this awesome package! 🎉🎂🎆🪩🌌🥦
Checklist
Include documentation when adding new features.If this change fixes an issue, please:
Add text likecloses #XYZWto the PR description and/or commits (whereXYZWis the issue number). See the github docs for more information.Unless your change is trivial or a small documentation fix (e.g., a typo or reword of a small section) please:
changelogfolder, with a name like<ISSUE NUMBER>.<TYPE>.rst. See changelog/README.rst for details.AUTHORSin alphabetical order.