Skip to content

experiment: use uv and dependency-groups in build pipelines#14122

Open
RonnyPfannschmidt wants to merge 2 commits into
pytest-dev:mainfrom
RonnyPfannschmidt:enable-uv
Open

experiment: use uv and dependency-groups in build pipelines#14122
RonnyPfannschmidt wants to merge 2 commits into
pytest-dev:mainfrom
RonnyPfannschmidt:enable-uv

Conversation

@RonnyPfannschmidt

Copy link
Copy Markdown
Member

Experiment to modernize build infrastructure:

  • Add uv.lock and dependency-groups (PEP 735)
  • Use tox-uv in CI for faster installs
  • Bump minimum dep versions to sensible modern values

Usage: uv sync --group dev && uv run pytest

@RonnyPfannschmidt RonnyPfannschmidt force-pushed the enable-uv branch 2 times, most recently from 02b004f to 4d21d6f Compare January 17, 2026 20:12
@RonnyPfannschmidt RonnyPfannschmidt added the skip news used on prs to opt out of the changelog requirement label Jan 17, 2026
@RonnyPfannschmidt RonnyPfannschmidt force-pushed the enable-uv branch 2 times, most recently from d18014f to ccefa12 Compare June 10, 2026 09:20
RonnyPfannschmidt and others added 2 commits July 14, 2026 10:15
This is an experimental change to modernize the build infrastructure:

- Add uv.lock for reproducible dependency resolution
- Migrate from optional-dependencies to dependency-groups (PEP 735)
- Configure tox to use tox-uv for faster dependency installation
- Update all GitHub Actions workflows to install tox-uv
- Update minimum version pins to sensible modern values:
  - iniconfig>=2, packaging>=24, pygments>=2.15, tomli>=2
  - attrs>=23.1, hypothesis>=6.75, numpy>=1.26, pytest-xdist>=3.5
  - coverage>=7.5, pexpect>=4.9, pre-commit>=4
- Remove py library from dev deps (pytest vendors its own minimal version)

Usage:
  uv sync --group dev    # Install with dev dependencies
  uv run pytest          # Run tests
  uvx --with tox-uv tox  # Run tox with uv backend

Co-authored-by: Cursor AI <ai@cursor.sh>
Co-authored-by: Anthropic Claude <claude@anthropic.com>
The PEP 735 dependency group is a superset of the old optional extra
and nothing in the repo references pytest[dev] anymore.

Co-authored-by: Cursor AI <ai@cursor.sh>
Co-authored-by: Anthropic Claude Opus 4 <claude@anthropic.com>
@RonnyPfannschmidt RonnyPfannschmidt marked this pull request as ready for review July 14, 2026 08:18
Copilot AI review requested due to automatic review settings July 14, 2026 08:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR experiments with modernizing pytest’s build/dev infrastructure by adopting uv lockfiles and PEP 735 dependency groups, and integrating tox-uv into CI to speed up environment creation and installs.

Changes:

  • Add a uv.lock lockfile and define a dev dependency group in pyproject.toml.
  • Switch tox environments to use dependency_groups (and add tox-uv) instead of the dev extra.
  • Update GitHub Actions workflows to install tox-uv alongside tox.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock Adds a uv lockfile capturing resolved dependencies and markers for the repo.
tox.ini Migrates tox env dependency management to dependency_groups and introduces tox-uv.
pyproject.toml Updates core dependency minimums and introduces [dependency-groups].dev.
.github/workflows/update-plugin-list.yml Installs tox-uv in the workflow runner before invoking tox.
.github/workflows/test.yml Installs tox-uv in CI before running tox test jobs.
.github/workflows/prepare-release-pr.yml Installs tox-uv before running the release-prep tox env.
.github/workflows/doc-check-links.yml Installs tox-uv before running docs linkcheck via tox.
.github/workflows/deploy.yml Installs tox-uv before running the release-notes tox env.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tox.ini
changedir = testing/plugins_integration
dependency_groups =
deps = -rtesting/plugins_integration/requirements.txt
allowlist_externals = pip
Comment thread pyproject.toml
Comment on lines +67 to +86
[dependency-groups]
dev = [
# Core test dependencies
"argcomplete",
"asynctest; python_version<'3.11'",
"attrs>=23.1",
# Test execution and coverage
"coverage>=7.5",
"hypothesis>=6.75",
"mock",
"numpy>=1.26",
"pexpect>=4.9",
"pytest-xdist>=3.5",
# Additional test dependencies
"pyyaml",
"requests",
"setuptools",
"xmlschema",
]

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

Labels

skip news used on prs to opt out of the changelog requirement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants