pytest-dev / pytest-dev/pluggy
evolve hook tracing by providing the concept of hook exec/call tracers
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 160
- Avg merge
- 21h 4m
- Merged PRs (30d)
- 6
Description
with the evolution attempts in the claude pr #584 i arrived at an idea to help better trace what hooks get called
instead of adding before/after function
we will have internal hook wrappers following a spec of
@hookspec(wrapper=True)
def pluggy_trace_hookexec(hook_name: str,
hooks: Sequence[HookImpl],
wrappers: Sequence[WrapperImpl],
kwargs: Mapping[str, object],
firstresult: bool):...
code before any hook gets called
result = yield
after all hooks have executed
# no result mod allowed
@hookspec(wrapper=True)
def pluggy_trace_hook_wrapper(wrapper: WrapperImpl): ...
before wrapper is active
result = yield
after wrapper is donr
@hookspec(wrapper=True)
def pluggy_trace_hook_wrapper(hook: HookImpl): ...
before hook was called
result = yield
after hook was called
note - we may choose to add additional arguments to ensure a good developer experience
i just added the minium needed to get started
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.
Research direction
Start by reviewing the evolution attempts in Claude PR #584 and the proposed hook wrapper specifications in this issue. Compare the hook-execution, hook-wrapper, and individual-hook tracing concepts, then clarify the API and arguments with maintainers. Done means an agreed tracing design with defined behavior for execution and wrapper boundaries.
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
- Needs clarification
- Newbie friendliness
- 25/100