pytest-dev / pytest-dev/pluggy

Allow for custom hook callers?

Open
#151 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion enhancement question
Dominant language
Python
Stars
1.7k
Forks
160
Avg merge
21h 4m
Merged PRs (30d)
6

Description

In #133 there was a request to be able to provide a custom _HookCaller (in this case in order to be able to warn on deprecated hook calls - since addressed via #138).

This feature may be quite useful in the future not only in its ability to allow users to customize the pluggy runtime but also if we want to eventually support async / coroutine based plugins (this can be done loop agnostic these days with something like multio and/or trio-asyncio).

I'd like to get feedback on this.

To start it would mean that we would make a simple change where PluginManager can take a hook_caller_type as input during instantiation.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with PluginManager instantiation and read the context in issues #133 and #138, including the discussion about custom _HookCaller implementations and future async plugins. The issue does not define acceptance criteria; progress would require agreeing on the API and documenting what behavior should demonstrate that custom hook callers are supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.