--build-info: give no answer when pip can't unpack the sdist (file/folder name clash)

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
cli, devtools

Direzione di ricerca

Read src/wheelgap/pypi.py and its fetch_sdist_pyproject function, then review the existing tar tests in tests/test_build.py. Check how member paths and hard-link names are tracked, and compare unpacking behavior with pip's untar_file if pip is importable. Done means clashes produce no answer, name tracking is capped at 100,000, regression tests cover the cases, and the cache key changes from build-v1 to build-v2.

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

Descrizione

help wanted

--build-info reads an sdist's pyproject.toml the way pip 26.3's untar_file does and gives no answer whenever pip would read something else or fail. One failure case is still answered: a member that is both a file and a folder.

  • t/pyproject.toml, then t/a as a file, then t/a as a folder (or t/a/x): pip raises FileExistsError / NotADirectoryError, wheelgap still prints build needs: ….

What to do

  • In src/wheelgap/pypi.py (fetch_sdist_pyproject), track which member paths are files and which are folders (explicit or implied by a deeper member), and give no answer on a clash.
  • Cap the number of names kept for this and for the hard-link check (today the cap is by total characters, so a million short names use about 140 MiB). Something like 100,000 names, after which there's no answer.
  • Tests next to the existing tar tests in tests/test_build.py, including a differential case against pip._internal.utils.unpacking.untar_file if it's practical to vendor that call in a test-only helper (skipped when pip isn't importable).
  • Also bump the build-info cache key (build-v1 → build-v2) since the rules changed after the last release.
Lingua principale
Python
Stelle
0
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

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

Tutte le issue di patrickballard/wheelgap

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.