unregister() argument validation relies on assert
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 42/100
Research direction
The checks live in the unregister() method, which the issue names but does not locate in a file, so search the repository for it. Confirm that assert is what enforces the two conditions, then run the existing unregister tests to see what currently passes. Done means both error cases raise the proposed exceptions, but the maintainers have not yet agreed to the AssertionError breaking change, so check for a decision before writing code.
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.
unregister() checks "one of name or plugin" and "plugin is not registered" with assert. Under python -O, pm.unregister(unregistered_plugin) silently returns the plugin, and pm.unregister() returns None.
Proposal: raise TypeError when neither argument is given, and ValueError when the plugin is not registered. Code that currently catches AssertionError would need to change.
Found while working on #759.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 172
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 21
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
-
Plugin registry compares plugins by equality, not identityPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
pytest-dev/pluggy#760 ·
Maintainers usually reply within 1 day
-
Defaulted positional-only hook parameters are forwarded as keywordsPossibly taken @adenzhou1350 claimed this 1 day ago. Open
Difficulty 4/5 1-2 days Newbie friendliness 45/100
pytest-dev/pluggy#774 ·
Maintainers usually reply within 1 day
-
list_plugin_distinfo() keeps unregistered pluginsPossibly taken @RonnyPfannschmidt claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
pytest-dev/pluggy#763 ·
Maintainers usually reply within 1 day
-
Failures during add_hookspecs / historic replay leave partial statePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 50/100
pytest-dev/pluggy#761 ·
Maintainers usually reply within 1 day
-
[Downstream] devpi broken - trying to register `None`Possibly taken @bluetech claimed this 11 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 58/100
pytest-dev/pluggy#749 · 4 comments ·
Maintainers usually reply within 1 day
All issues in pytest-dev/pluggy
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
darnitdevorg/darnit#587 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
accessibility good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
llm translation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug bug-hunt
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day