Plugin registry compares plugins by equality, not identity
Maintainers usually reply within 1 day
@00200200 is already working on this.
Since Oct 11, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
Start in the plugin manager's register(), get_name() and is_registered(), which compare plugins with == or in over _name2plugin values, and compare them with get_hookcallers(), which already uses is. Reproduce with the two-instance dataclass example from the issue, then switch the comparisons to identity. Done when two equal but distinct plugin objects can be registered under different names, and the existing test suite still passes.
Written by the indexing model from the issue text.
Description
🤖 Written by Claude Opus 5.5 via Claude Code for the pluggy maintainers; I prompted it, it did the work, I read it.
register() (plugin in self._name2plugin.values()), get_name() and is_registered() use ==, while get_hookcallers() uses is. Two distinct plugins that compare equal are treated as one:
@dataclass
class P:
@hookimpl
def myhook(self): ...
pm.register(P(), "one")
pm.register(P(), "two") # ValueError: Plugin already registered under a different name
Proposal: use identity everywhere. Small behavior change for plugins with a custom __eq__.
Found while working on #759.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 187
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 22
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pytest-dev/pluggy
-
deprecate passing None as a plugin instanceMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
pytest-dev/pluggy#790 ·
Maintainers usually reply within 1 day
-
Defaulted positional-only hook parameters are forwarded as keywordsPossibly taken @adenzhou1350 claimed this 4 days ago. Open
Difficulty 4/5 1-2 days Newbie friendliness 45/100
pytest-dev/pluggy#774 · 2 comments ·
Maintainers usually reply within 1 day
-
list_plugin_distinfo() keeps unregistered pluginsPossibly taken @RonnyPfannschmidt claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
pytest-dev/pluggy#763 · 1 comment ·
Maintainers usually reply within 1 day
-
unregister() argument validation relies on assertPossibly taken @ekanshul claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
pytest-dev/pluggy#762 ·
Maintainers usually reply within 1 day
-
Failures during add_hookspecs / historic replay leave partial statePossibly taken @starx710 claimed this 1 day ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 50/100
pytest-dev/pluggy#761 ·
Maintainers usually reply within 1 day
All issues in pytest-dev/pluggy
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
WingedGuardian/GENesis-AGI#3375 ·
Maintainers usually reply within 1 day
-
curriculum documentation quality
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
githubnext/gh-aw-workshop#4601 ·
Maintainers usually reply within 1 day
-
approved Good First Issue scope: docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
hiero-ledger/hiero-sdk-python#2730 · 3 comments ·
Maintainers usually reply within 1 day