Tests for grafted_library_problem, the check that a recipe's library was linked statically
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
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- testing-qa
Línea de trabajo
Empieza con grafted_library_problem() en scripts/gap_wheels.py, que marca cualquier miembro cuya carpeta de nivel superior termine en .libs, y con las pruebas existentes bundled_licence_problem en tests/test_gap_wheels.py para copiar su estilo de zipfile en memoria. Añade los casos enumerados: que no haya carpeta .libs da None, que una carpeta .libs de nivel superior da el motivo, que un archivo notes.libs de nivel superior y una carpeta anidada yaml/vendor.libs dan None, que bytes que no son zip dan el motivo de no poder leerlo, y que un zip vacío da None. Ejecuta uvx --python 3.14 [email protected] para confirmar que pasan en main, luego aplica y revierte mutaciones de una línea para mostrar que dos pruebas fallan.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
grafted_library_problem() in scripts/gap_wheels.py (added with library recipes, #33) is one of the checks between a built wheel and publication. A recipe's library must be linked into the extension statically. If the build instead picked up a shared copy from somewhere else, auditwheel bundles it into a <dist>.libs/ folder, and that copy didn't come from the recipe's checked source. The function reads the wheel's member names and returns a reason when it finds such a folder:
grafted = any("/" in n and n.partition("/")[0].endswith(".libs") for n in z.namelist())
...
return "bundles a shared library in a .libs folder; a recipe's library must be linked in statically" if grafted else None
cmd_stage() calls it for every wheel built with a recipe: reason = bundled_licence_problem(data, recipes) or grafted_library_problem(data).
Nothing tests it. git grep grafted_library_problem finds the definition and that one call. A slip in a later edit (say endswith(".libs") becoming == ".libs") would let a wheel with an unreviewed shared library through staging with every test green.
What to do
Add tests to tests/test_gap_wheels.py, next to the tests for bundled_licence_problem. Build each wheel in memory with zipfile (empty files are enough; other tests there show how):
- a wheel with no
.libsfolder:None; PyYAML.libs/libyaml-0.so.2: the reason;pyyaml.libs/x.soandpkg_name.libs/sub/y.so.1: the reason (any top-level folder ending in.libs);- a top-level file named
notes.libs(no/):None; - a nested folder
yaml/vendor.libs/x.so:None, since only a top-level folder is where auditwheel grafts (pin today's behaviour, and say in the PR if you think it's wrong); - bytes that aren't a zip: the reason
couldn't read its members, not an exception; - an empty zip:
None.
And one test through cmd_stage()'s path if the existing staging tests make that easy (tests/test_build_tool_lock.py patches take_wheel for one): a recipe wheel with a .libs folder isn't staged, and its summary line carries the reason.
Tests only: scripts/ stays as it is. If a case shows a real bug, report it in the PR and leave the fix to a maintainer.
Done when:
- The cases above are in
tests/test_gap_wheels.pyand pass onmain. - In the PR description, give two one-line changes to
grafted_library_problem()that each make a test fail (each applied, run and reverted). 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
- 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 wheelgap/wheels
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
enhancement help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
-
bug help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
bug help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de wheelgap/wheels
Issues similares
-
flaky: test_fire_returns_thread_per_http_entry_on_head waits 5 s per dispatch worker on busy shardsAbiertostatus/accepted type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
microsoft/apm#5309 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug vector-store
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
EverMind-AI/Raven#1413 ·
Los mantenedores suelen responder en 1 día
-
Tests: parallel pyinstallcheck runs oversubscribe the machine through nested TBB and BLAS poolsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
ACCESS-NRI/containerised-environments-infra#143 ·
Los mantenedores suelen responder en 2 días