Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Failures during add_hookspecs / historic replay leave partial state

Aperta
#761 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@starx710 ci sta già lavorando.

Dal 14/10/2026.

  • #779 di @xiehuanyi — aperta
  • #783 di @starx710 — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
50/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
devtools

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

🤖 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_hook raises for an already-registered impl, the spec stays installed via set_specification(). A retry then raises ValueError: 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.

Lingua principale
Python
Stelle
1.7k
Fork
187
Merge medio
1g 15h
PR unite (30g)
22

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pytest-dev/pluggy

Tutte le issue di pytest-dev/pluggy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.