Skip to content

fix(ci): isolate pytest-check-links so Max Versions matrix can collect#927

Merged
paddymul merged 1 commit into
mainfrom
fix/linkcheck-pytest9-isolation
Jun 15, 2026
Merged

fix(ci): isolate pytest-check-links so Max Versions matrix can collect#927
paddymul merged 1 commit into
mainfrom
fix/linkcheck-pytest9-isolation

Conversation

@paddymul

Copy link
Copy Markdown
Collaborator

Problem

The Python / Test (Max Versions) matrix fails at "Run tests" with exit code 1, before any test runs:

pluggy._manager.PluginValidationError: Plugin 'check-links' for hook 'pytest_collect_file'
hookimpl definition: pytest_collect_file(path: 'Any', parent: 'pytest.Collector') -> 'CheckLinks | None'
Argument(s) {'path'} are declared in the hookimpl but can not be found in the hookspec

Seen on run 27550697421 (hit while another PR was open; fixing it properly here).

Cause

Fully deterministic in the pytest version:

  • Max Versions installs with uv sync --resolution=highest, pulling pytest 9.1.0.
  • pytest 9.0 removed the legacy path (py.path) argument from the pytest_collect_file hookspec.
  • pytest-check-links 0.10.1 caps pytest<9 in its own metadata, so the max-versions resolve can't use it and backtracks to 0.9.1 (no cap), installing it next to pytest 9.1.
  • 0.9.1's hookimpl still declares path, so pluggy's startup validation raises PluginValidationError and aborts collection for the entire unit suite.

This is unrelated to test content and distinct from the post-summary polars/pyo3 SIGABRT (exit 134) that scripts/run_pytest_tolerant.sh handles — this is exit 1 during collection. It only hits Max Versions; the locked matrices use an older pytest where the plugin loads fine.

pytest-check-links is docs tooling, not a buckaroo runtime dependency — only the CheckDocs job runs pytest --check-links (checks.yml). It has no business in the Max Versions matrix.

Fix

  • Move pytest-check-links out of the shared dev deps into a dedicated linkcheck dependency-group, pinned >=0.10.1 with an explicit pytest<9 belt.
  • Install linkcheck only in CheckDocs (--group linkcheck).
  • Exclude it from Max Versions with --no-group linkcheck, mirroring the existing --no-group datacompy.

Verification

  • Reproduced locally: pytest 9.1.0 + pytest-check-links 0.9.1 → PluginValidationError; pytest 8.4.2 → loads fine.
  • Faithful max-versions resolve (--resolution=highest ... --no-group linkcheck): pytest-check-links absent, all 1212 unit tests collect with no error.
  • CheckDocs env (--group linkcheck): pytest-check-links 0.10.1 under pytest<9, --check-links option registered, plugin loads cleanly.
  • Unit suite passes locally (2 unrelated artifact_test failures are pre-existing in this checkout — they need a built dist artifact and fail identically on main).

🤖 Generated with Claude Code

The Max Versions matrix (uv sync --resolution=highest) pulls pytest 9.1,
which removed the legacy `path` argument from the pytest_collect_file
hookspec. pytest-check-links 0.10.1 caps pytest<9 in its metadata, so an
unconstrained max-versions resolve backtracks to 0.9.1 (no cap) and
installs it next to pytest 9 — its hookimpl still declares `path`, so
pluggy raises PluginValidationError at startup and aborts collection for
the whole unit suite. Failure is unrelated to test content and distinct
from the post-summary SIGABRT that run_pytest_tolerant.sh handles.

pytest-check-links is docs tooling, not a buckaroo runtime dependency:
only the CheckDocs job runs `pytest --check-links`. Move it out of the
shared dev deps into a dedicated `linkcheck` group (pinned >=0.10.1 with
an explicit pytest<9 belt), install that group only in CheckDocs, and add
`--no-group linkcheck` to Max Versions (mirroring --no-group datacompy).

Verified: a faithful max-versions resolve no longer installs
pytest-check-links and collects all unit tests; the CheckDocs env keeps
pytest-check-links 0.10.1 under pytest<9 with --check-links registered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

📦 TestPyPI package published

pip install --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo==0.14.20.dev27551847546

or with uv:

uv pip install --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo==0.14.20.dev27551847546

MCP server for Claude Code

claude mcp add buckaroo-table -- uvx --from "buckaroo[mcp]==0.14.20.dev27551847546" --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo-table

📖 Docs preview

🎨 Storybook preview

@paddymul paddymul merged commit 13f4fd9 into main Jun 15, 2026
27 checks passed
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