Skip to content

CI: build (3.14) fails — pytest-pep8 incompatible with modern pytest #81

Description

@martinkersner

Summary

build (3.14) in .github/workflows/python-package.yml fails at pytest startup, before any test is collected. Pre-existing on main (e.g. run on main@2f3050f, 2026-06-04) — not introduced by any open PR. The 3.14 job is the only matrix entry that runs pytest (if: matrix.python-version == '3.14', line 35); 3.10–3.13 run only black + flake8, so they stay green and mask this.

Error

pluggy._manager.PluginValidationError: Plugin 'pep8' for hook 'pytest_collect_file'
hookimpl definition: pytest_collect_file(path, parent)
Argument(s) {'path'} are declared in the hookimpl but can not be found in the hookspec

Root cause

requirements/requirements-test.txt pins pytest-pep8>=1.0.6 — an abandoned plugin (last release ~2014) whose pytest_collect_file(path, parent) hook uses the path argument that modern pytest removed from the hookspec. On Python 3.14, pip resolves a current pytest/pluggy that rejects the legacy plugin, so pytest aborts at startup.

Proposed fix (decide during impl)

  • Preferred: remove pytest-pep8 from requirements/requirements-test.txt. It's dead weight — flake8 (7.3.0) already runs as its own CI step and covers pep8/style; nothing invokes the --pep8 flag, and the pytest call is a plain python -m pytest tests/.
  • Alternatives (worse): pin pytest<8.4 (likely unsatisfiable on 3.14), or swap to pytest-flake8 (also unmaintained).

Done when

  • build (3.14) runs the test suite to completion (green) on a branch based on main (not on any in-flight feature PR).
  • No abandoned pytest plugin remains in requirements-test.txt.

Notes

  • Base the fix branch on origin/main, independent of PR snake_case query params: send top_n / min_volume_usd #80 (snake_case params, Bisonai/datamaxi-backend#7398) — that PR's red 3.14 check is this same pre-existing failure, not its own regression.
  • Optional follow-up worth considering: the if: matrix.python-version == '3.14' guard means tests only ever run on one interpreter; consider running pytest across the whole matrix once it's green.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions