Skip to content

Deprecate positional-only hookimpl parameters - #850

Open
RonnyPfannschmidt wants to merge 1 commit into
mainfrom
claude/project-thread-gppmub
Open

RonnyPfannschmidt wants to merge 1 commit into
mainfrom
claude/project-thread-gppmub

Conversation

@RonnyPfannschmidt

Copy link
Copy Markdown
Member

Requested by Ronny · project thread

🤖 Written by Claude Opus 5.5 via Claude Code for the pluggy maintainers; I prompted it, it did the work, I read it.

Implements the deprecation agreed on #774. PluginManager._verify_hook now warns about positional-only hookimpl parameters, next to the existing warn_on_impl handling and through _warn_for_function, so the warning points at the def. That means it fires once at registration (or when the spec is added later) and never on the call path or for call_extra. A bound self is not reported. Hookspecs are untouched for now; whether to deprecate positional-only there too is open.

Replaces #775.


Generated by Claude Code

Warn in PluginManager._verify_hook, next to the existing warn_on_impl
handling, so the check runs once at registration (or when the spec is
added later) and never on the call path. Hook arguments are matched by
name, so positional-only parameters are not a supported shape.

Refs #774.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants