Data test: check each gap wheel's requires_python against a late patch release (X.Y.99) too

Abierto Apto para principiantes
#37 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
testing-qa

Línea de trabajo

Empieza en tests/test_data.py, en target_python(), excluding_clause() y requires_python_error(), a los que llama validation_errors(). Lee test_mutations_are_rejected_with_the_wheel_named para ver el formato del mensaje que debe mantener el caso existente X.Y.0. Añade una segunda comprobación en X.Y.99 dentro de requires_python_error() y añade los casos de mutación y passing enumerados. Está terminado cuando los nuevos casos fallan con el wheel y la versión excluida nombrados, y uvx --python 3.14 [email protected] pasa sin conexión.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

good first issue

Since #30 tests/test_data.py checks that every entry's requires_python admits the Python its wheel was built for. It compares against X.Y.0 only (target_python() returns (3, 14, 0) for 3.14 musl-aarch64). That is how pip treats a pre-release of a new Python, and it's the right first check.

It misses a value that admits X.Y.0 and leaves out later patch releases:

<3.14.1      admits 3.14.0, excludes 3.14.1 and every later 3.14
!=3.14.10    admits 3.14.0, excludes the 3.14.10 the wheel was built and tested on
==3.14.0     the same

An entry like that passes the test today. The wheel would show "in the index" on the page and in-index in status.json, and pip and uv on a current 3.14 would skip it without a word. wheelgap --fix would send people to it as well. Found in the review of #35.

Where

tests/test_data.py: target_python(), excluding_clause() and requires_python_error(), called from validation_errors().

What to do

  • In requires_python_error(), check the target's Python twice: as X.Y.0 (as now) and as X.Y.99, a patch release later than any real one. If either is excluded, report it, naming the version that failed: <wheel>: requires_python <3.14.1 excludes Python 3.14.99, a later patch release of its target.
  • Keep the existing message for X.Y.0 word for word, so the mutation cases that are there still match.
  • Add mutation cases to test_mutations_are_rejected_with_the_wheel_named: <3.14.1, !=3.14.99, ==3.14.0 and ~=3.14.0,<3.14.5 on a 3.14 target. Add cases that must still pass: >=3.10, <4,>=3.9, ==3.14.* and ~=3.14.0.

Tests only. If a real entry fails, list it in the PR and leave data/ and scripts/ as they are. Withdrawing a wheel is a maintainer's call.

Done when:

  • test_real_wheel_index_is_well_formed passes on main's data, or the PR lists each entry that fails.
  • The new mutation cases each fail with the wheel named and the version that was excluded.
  • In the PR description, give the one-line change to your code that makes one new case pass wrongly (for example: check X.Y.1 in place of X.Y.99).
  • uvx --python 3.14 [email protected] passes, offline. No new dependencies.
Lenguaje dominante
Python
Estrellas
0
Forks
1
Merge medio
5 h 59 min
PR fusionados (30 d)
19

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 wheelgap/wheels

Todos los issues de wheelgap/wheels

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.