Skip to content

docs: clarify hookimpl specname limitation#14485

Merged
Pierre-Sassoulas merged 1 commit into
pytest-dev:mainfrom
MukundaKatta:codex/document-hookimpl-specname-limit
May 23, 2026
Merged

docs: clarify hookimpl specname limitation#14485
Pierre-Sassoulas merged 1 commit into
pytest-dev:mainfrom
MukundaKatta:codex/document-hookimpl-specname-limit

Conversation

@MukundaKatta
Copy link
Copy Markdown
Contributor

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
@Pierre-Sassoulas Pierre-Sassoulas merged commit 0a4f889 into pytest-dev:main May 23, 2026
33 checks passed
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

3 participants