TST: Drop pytest-flake8, incompatible with pytest 9#131
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The pytest_collect_file hookspec dropped the deprecated
pathargument 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.