Temporary registration via context manager
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by reading the linked pysipp/plugin.py example, then inspect PluginManager and its existing register and unregister methods. Done means a context-manager API can temporarily register the supplied plugins, keep them active inside the block, and unregister them afterward.
Written by the indexing model from the issue text.
Description
This is a proposal for a very simple new feature. I actually implemented it in a side project pysipp and was thinking it was something we could add to the PluginManger.
The jist of it is adding a way to temporarily register plugins using a context manager api:
with pluginmanager.register_all([pluginmod1, pluginmod2]) as pm:
#... do stuff that requires above plugins to be active...
# continue with stuff that doesn't require above plugins to be registered.
So it would basically just be adding PluginManager.register_all() (or whatever name you guys think is best) method that is a simple wrapper around register/unregister.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 160
- Avg merge
- 16h 37m
- Merged PRs (30d)
- 8
Contributor guide
No contributing guide indexed for this repository
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
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
pytest-dev/pluggy#681 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
pytest-dev/pluggy#733 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
pytest-dev/pluggy#705 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 20/100
pytest-dev/pluggy#628 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
pytest-dev/pluggy#588 · 1 reaction ·
All issues in pytest-dev/pluggy
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Openarea: ci bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ClickHouse/clickhouse-connect#1057 ·