Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Plugin registry compares plugins by equality, not identity

Open Beginner friendly
#760 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@00200200 is already working on this.

Since Oct 11, 2026.

  • #768 by @CaramelizedCUDA — closed without merging
  • #770 by @himanshu748 — closed without merging
  • #773 by @anon5376 — closed without merging
  • #777 by @00200200 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
tooling

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pytest-dev/pluggy

All issues in pytest-dev/pluggy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.