Skip to content

TST: Drop pytest-flake8, incompatible with pytest 9#131

Merged
scottclowe merged 1 commit into
masterfrom
tst_fix-ci
Jul 22, 2026
Merged

TST: Drop pytest-flake8, incompatible with pytest 9#131
scottclowe merged 1 commit into
masterfrom
tst_fix-ci

Conversation

@scottclowe

Copy link
Copy Markdown
Owner

The pytest_collect_file hookspec dropped the deprecated path argument in pytest 9, but pytest-flake8 still declares it in its hookimpl. Since plugins are loaded from entry points before collection begins, pytest aborts at startup with a pluggy PluginValidationError, taking the whole test suite down with it. This affects pytest-flake8 1.3.0, its latest release; the project is unmaintained, so there is no fixed version to upgrade to.

The plugin was not doing anything for us in any case. Its checks are gated behind an opt-in --flake8 flag which we never passed, so it added zero collected items. flake8 itself is unaffected and still runs in the pre-commit hooks (with the full plugin set, enforced on GHA by the pre-commit workflow) and as a sanity check step in the tests workflow.

The pytest_collect_file hookspec dropped the deprecated `path` argument
in pytest 9, but pytest-flake8 still declares it in its hookimpl. Since
plugins are loaded from entry points before collection begins, pytest
aborts at startup with a pluggy PluginValidationError, taking the whole
test suite down with it. This affects pytest-flake8 1.3.0, its latest
release; the project is unmaintained, so there is no fixed version to
upgrade to.

The plugin was not doing anything for us in any case. Its checks are
gated behind an opt-in --flake8 flag which we never passed, so it added
zero collected items. flake8 itself is unaffected and still runs in the
pre-commit hooks (with the full plugin set, enforced on GHA by the
pre-commit workflow) and as a sanity check step in the tests workflow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F1Zkaexz4SbsuUsCbrykrS
@scottclowe
scottclowe merged commit 5b87e5c into master Jul 22, 2026
11 checks passed
@scottclowe
scottclowe deleted the tst_fix-ci branch July 22, 2026 21:23
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