Skip to content

docs: clarify hookimpl specname limitation#14485

Open
MukundaKatta wants to merge 1 commit into
pytest-dev:mainfrom
MukundaKatta:codex/document-hookimpl-specname-limit
Open

docs: clarify hookimpl specname limitation#14485
MukundaKatta wants to merge 1 commit into
pytest-dev:mainfrom
MukundaKatta:codex/document-hookimpl-specname-limit

Conversation

@MukundaKatta
Copy link
Copy Markdown

Add a note to the hook ordering documentation explaining that @pytest.hookimpl(specname=...) still requires implementation function names to start with pytest_. This documents the current limitation discussed in gh-11307 and points users toward suffixed hook names such as pytest_collection_modifyitems_tryfirst.

Closes #11307

Verification:

  • sphinx-build -W --keep-going -b html doc/en doc/en/_build/html
  • git diff --check

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pytest.hookimpl does not respect the specname keyword argument

1 participant