Failures during add_hookspecs / historic replay leave partial state
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 50/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🤖 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.
- Lenguaje dominante
- Python
- Estrellas
- 1.7k
- Forks
- 172
- Merge medio
- 2 d 18 h
- PR fusionados (30 d)
- 21
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pytest-dev/pluggy
-
Plugin registry compares plugins by equality, not identityPosiblemente ocupada @00200200 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
pytest-dev/pluggy#760 ·
Los mantenedores suelen responder en 1 día
-
Defaulted positional-only hook parameters are forwarded as keywordsPosiblemente ocupada @adenzhou1350 la tomó hace 2 días. Abierto
Dificultad 4/5 1-2 días Aptitud para principiantes 45/100
pytest-dev/pluggy#774 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
list_plugin_distinfo() keeps unregistered pluginsPosiblemente ocupada @RonnyPfannschmidt la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
pytest-dev/pluggy#763 ·
Los mantenedores suelen responder en 1 día
-
unregister() argument validation relies on assertPosiblemente ocupada @ekanshul la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 42/100
pytest-dev/pluggy#762 ·
Los mantenedores suelen responder en 1 día
-
[Downstream] devpi broken - trying to register `None`Posiblemente ocupada @bluetech la tomó hace 12 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
pytest-dev/pluggy#749 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de pytest-dev/pluggy
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
huggingface/peft#3955 ·
Los mantenedores suelen responder en 1 día
-
author-page correction
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
acl-org/acl-anthology#10313 ·
Los mantenedores suelen responder en 1 día
-
anime duplicate exception request-theme
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
LizardByte/ThemerrDB#8926 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
huggingface/transformers#49556 ·
Los mantenedores suelen responder en 1 día
-
area/security bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
mozilla-ai/otari#2245 ·
Los mantenedores suelen responder en 1 día