Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Failures during add_hookspecs / historic replay leave partial state

Abierto
#761 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@xiehuanyi ya está trabajando en esto.

Desde el 11/10/2026.

  • #779 de @xiehuanyi — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
50/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
devtools

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_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.

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pytest-dev/pluggy

Todos los issues de pytest-dev/pluggy

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.