Skip to content

Commit 8e772b9

Browse files
authoredMar 22, 2025
Specify minimum requirements for dependencies (#13317)
Specifies minimum allowed versions of `colorama`, `iniconfig`, and `packaging`, and bumps the minimum requirement of `exceptiongroup` to no longer be a release candidate. This specifies minimum allowed versions that are several years old, but these can be changed to be more recent. ## Motivation [`uv`](https://docs.astral.sh/uv/) has multiple dependency [resolution strategies](https://docs.astral.sh/uv/concepts/resolution/#resolution-strategy): - `lowest` will install the lowest allowed version for _all_ dependencies, both direct and indirect (transitive). - `lowest-direct` will use the lowest compatible versions for all _direct_ dependencies, while using the latest compatible versions for all other dependencies. Up until now, `pytest` has not specified the minimum allowed versions of multiple dependencies in `pyproject.toml`. When I ran `uv pip install pytest==8.3.5 --resolution=lowest` in a fresh virtual environment, it installed `packaging==14.0` (released in 2014 👀) and `iniconfig==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`'s `lowest` dependency resolution strategy results the first release of certain indirect dependencies being installed, like `v0.0.0.1`. Specifying lower bounds will make it a lot more practical for `pytest` users to test against the oldest allowed versions of both indirect and direct dependencies.
1 parent e34fc62 commit 8e772b9

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed
 

‎changelog/13317.packaging.rst

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Specified minimum allowed versions of ``colorama``, ``iniconfig``,
2+
and ``packaging``; and bumped the minimum allowed version
3+
of ``exceptiongroup`` for ``python_version<'3.11'`` from a release
4+
candidate to a full release.

‎pyproject.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ dynamic = [
4646
"version",
4747
]
4848
dependencies = [
49-
"colorama; sys_platform=='win32'",
50-
"exceptiongroup>=1.0.0rc8; python_version<'3.11'",
51-
"iniconfig",
52-
"packaging",
49+
"colorama>=0.4; sys_platform=='win32'",
50+
"exceptiongroup>=1; python_version<'3.11'",
51+
"iniconfig>=1",
52+
"packaging>=20",
5353
"pluggy>=1.5,<2",
5454
"pygments>=2.7.2",
5555
"tomli>=1; python_version<'3.11'",

0 commit comments

Comments
 (0)