pytest-dev / pytest-dev/pluggy

Move tracing "intercept" methods to `_HookCaller`?

Open
#262 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This relates to #217 as well as discussion in other issues.

The main refactoring would include:

  • moving PluginManager._inner_hookexec lambda indirection onto the _HookCaller
  • possibly (and subsequently) remove PluginManager._hookexec entirely
  • re-work the tracing methods to support per hook tracing and if global tracing is desired have the manager loop through all underlying callers to insert trace functions.

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 src/pluggy/manager.py, especially PluginManager._inner_hookexec, _hookexec, and the tracing methods around the referenced lines. Read issue #217 and the related discussion before deciding how per-hook tracing and global tracing should interact. Done means the interception and tracing responsibilities are moved toward _HookCaller as described, with any _hookexec removal handled consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.