Skip to content

Conversation

@namurphy
Copy link
Contributor

@namurphy namurphy commented Mar 20, 2025

Description

This PR specifies minimum allowed versions of colorama, iniconfig, and packaging, and bumps the minimum requirement of exceptiongroup to 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

uv has multiple dependency resolution strategies:

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

Many thanks to everyone who has contributed to this awesome package! 🎉🎂🎆🪩🌌🥦

Checklist

  • Include documentation when adding new features.
  • Include new tests or update existing tests when applicable.
  • Allow maintainers to push and squash when merging my commits. Please uncheck this if you prefer to squash the commits yourself.

If this change fixes an issue, please:

  • Add text like closes #XYZW to the PR description and/or commits (where XYZW is 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:

  • Create a new changelog file in the changelog folder, with a name like <ISSUE NUMBER>.<TYPE>.rst. See changelog/README.rst for details.
  • Add yourself to AUTHORS in alphabetical order.
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Mar 20, 2025
@nicoddemus
Copy link
Member

This all seems good @namurphy, thanks!

Any reason it is still in Draft stage? Otherwise seems good to merge to me, we don't need tests for this I think.

@namurphy namurphy marked this pull request as ready for review March 21, 2025 13:49
@namurphy
Copy link
Contributor Author

namurphy commented Mar 21, 2025

Any reason it is still in Draft stage?

Nope, I was just waiting for tests to finish. Thank you for taking a look at this so quickly!

@nicoddemus nicoddemus merged commit 8e772b9 into pytest-dev:main Mar 22, 2025
52 checks passed
@nicoddemus
Copy link
Member

Thanks @namurphy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

2 participants