Failures during add_hookspecs / historic replay leave partial state
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
Start with add_hookspecs() and the _verify_hook call that can raise for an already-registered impl, then see where set_specification() installs the spec before that check runs. Next, look at register() and the comment near _maybe_apply_history, which admits a failed replay leaves the plugin half-registered. Done means a failed add_hookspecs leaves no spec behind so a retry succeeds, and a failed replay in register() rolls the registry back. The issue does not say how rollback should be structured, so confirm the approach with maintainers before writing it.
索引モデルが issue の本文から書いたものです。
説明
🤖 Written by Claude Opus 5.5 via Claude Code for the pluggy maintainers; I prompted it, it did the work, I read it.
add_hookspecs(): if_verify_hookraises for an already-registered impl, the spec stays installed viaset_specification(). A retry then raisesValueError: Hook 'h' is already registered within namespace ..., even after unregistering the bad plugin.register(): if a historic replay (_maybe_apply_history) raises, the plugin stays in the registry with only the hookimpls processed before the failure. The code comment there acknowledges this.
Proposal: validate first and install afterwards in add_hookspecs. For the replay case, roll back on exception.
Found while working on #759.
- 主要言語
- Python
- スター
- 1.7k
- フォーク
- 172
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 21
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pytest-dev/pluggy のほかの issue
-
Plugin registry compares plugins by equality, not identity対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
pytest-dev/pluggy#760 ·
メンテナーはふだん 1 日以内に返信
-
Defaulted positional-only hook parameters are forwarded as keywords対応中かも @adenzhou1350 が 1 日前に担当しました。 オープン
難易度 4/5 1〜2日 初心者へのやさしさ 45/100
pytest-dev/pluggy#774 ·
メンテナーはふだん 1 日以内に返信
-
list_plugin_distinfo() keeps unregistered plugins対応中かも @RonnyPfannschmidt が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
pytest-dev/pluggy#763 ·
メンテナーはふだん 1 日以内に返信
-
unregister() argument validation relies on assert対応中かも @ekanshul が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
pytest-dev/pluggy#762 ·
メンテナーはふだん 1 日以内に返信
-
[Downstream] devpi broken - trying to register `None`対応中かも @bluetech が 11 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
pytest-dev/pluggy#749 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
pytest-dev/pluggy の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
vllm-project/vllm#61131 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
kubernetes-client/python#2735 ·
メンテナーはふだん 1 日以内に返信
-
desktop help wanted test
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
docs pydanty:is-working
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pydantic/pydantic-ai#10113 ·
メンテナーはふだん 1 日以内に返信
-
Tutorial unit test leaks sample data into tutorial doctest対応中かも @Gambit-Checkmate が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100