From 0c3dfb1e80c34986ed94bf27f891ee53128bf1ac Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Sun, 20 Sep 2026 21:08:27 +0300 Subject: [PATCH] ci: resolve the declared dependency floors on every matrix entry --- .github/workflows/_checks.yml | 30 ++++++++++++++++++++++++++++++ pyproject.toml | 10 ++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_checks.yml b/.github/workflows/_checks.yml index 86f6cee..a5585a8 100644 --- a/.github/workflows/_checks.yml +++ b/.github/workflows/_checks.yml @@ -43,6 +43,36 @@ jobs: run: uv run --no-sync python -c "import sys, modern_di_pytest; assert not sys._is_gil_enabled(), 'GIL is enabled on a t-build'" - run: just test-ci + floors: + # Every other job resolves newest, so the declared floors are a claim nothing installs. + # This one resolves the bottom of each range, on every matrix entry: wheel coverage is + # per interpreter, so two interpreters resolving the same versions can still disagree + # on whether those versions install. + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: + - "3.10" + - "3.11" + - "3.12" + - "3.13" + - "3.14" + - "3.14t" + steps: + - uses: actions/checkout@v6 + - uses: astral-sh/setup-uv@v8.2.0 + with: + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" + - run: uv python install ${{ matrix.python-version }} + - run: uv python pin ${{ matrix.python-version }} + # --no-build so a floor with no wheel for this interpreter fails here instead of + # quietly compiling its sdist; --no-install-project because that flag would refuse to + # build this project too, and the tests import it from the checkout. + - run: uv sync --all-extras --no-install-project --resolution lowest-direct --no-build + - run: uv run --no-sync pytest + links: runs-on: ubuntu-latest steps: diff --git a/pyproject.toml b/pyproject.toml index fcf1365..5351fba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,12 @@ classifiers = [ "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Testing", ] -dependencies = ["modern-di>=3,<4", "pytest>=7"] +dependencies = [ + "modern-di>=3,<4", + # pytest's assertion rewriter used ast.Str, which 3.14 removed, until 7.4. + "pytest>=7; python_version < '3.14'", + "pytest>=7.4; python_version >= '3.14'", +] version = "0" [project.urls] @@ -31,9 +36,10 @@ Issues = "https://github.com/modern-python/modern-di-pytest/issues" Changelog = "https://github.com/modern-python/modern-di-pytest/releases" [dependency-groups] +# pytest stays unbounded here so the floor above governs it, not a harness bound. dev = [ "pytest", - "pytest-cov", + "pytest-cov>=5", ] lint = [ "ty",