Skip to content

ci: resolve the declared dependency floors on every matrix entry - #54

Open
lesnik512 wants to merge 1 commit into
mainfrom
ci/floors-gate
Open

lesnik512 wants to merge 1 commit into
mainfrom
ci/floors-gate

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Adds the floors job the org standard requires (standard.md §7), following modern-di-fastapi#56, and fixes the pytest floor it caught.

What the job found

pytest>=7 resolves to pytest 7.0.0, and pytest 7.0 through 7.3 do not run on Python 3.14. Their assertion rewriter reads ast.Str, which 3.14 removed:

File ".../_pytest/assertion/rewrite.py", line 697, in run
    and isinstance(item.value, ast.Str)
AttributeError: module 'ast' has no attribute 'Str'

Bisected: 7.0.0, 7.1.0, 7.2.0 and 7.3.0 fail on 3.14; 7.4.0 is the first that passes. Every interpreter below 3.14 is fine at 7.0.0, so the floor splits rather than rises:

"pytest>=7; python_version < '3.14'",
"pytest>=7.4; python_version >= '3.14'",

The pytest CI matrix never saw this because it resolves newest.

Why the job exists

pytest resolves every dependency at its newest, so the bottom of each declared range ships unexercised. This job resolves direct dependencies at their floors, wheel-only, on every entry of the same matrix pytest uses, and runs the suite against them.

--no-build: a floor reachable only by compiling an sdist is not a floor a user installing a wheel can reach. --no-install-project is mandatory alongside it — --no-build would otherwise refuse to build this project too, and the tests import it from the checkout.

The dev group

pytest is deliberately left unbounded in [dependency-groups]. It is a runtime dependency of this package, so a harness bound there would override the declared floor and the job would test the wrong version. pytest-cov is floored because --resolution lowest-direct otherwise resolves it to its first-ever release.

Verification

Run locally on all six interpreters at the floors: 25 passed on each. Resolved-newest path re-checked with just install && just lint-ci && just test-ci. Local runs are macOS/arm64; CI is the verdict on manylinux wheel coverage.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant