Fall back to .tar.gz sdists when no wheel is available#285
Conversation
Both PyPI browsing tools (zip-wheel-explorer and pypi-changelog) previously only worked with .whl files. Packages that ship only a source distribution (e.g. apple-fm-sdk) failed with "no wheel found". Add a fallback to the .tar.gz source distribution: - Detect gzip via magic bytes and decompress with the native DecompressionStream, then parse the tar with a small parser that handles ustar prefixes, GNU long names and PAX extended headers. - zip-wheel-explorer: prefer a wheel, else use the sdist; browse its files. - pypi-changelog: include sdist-only versions and strip the leading "<name>-<version>/" directory so paths align across versions when diffing.
|
Claude finished @simonw's task —— View job Code Review CompleteI've conducted a thorough review of this PR that adds .tar.gz fallback support for PyPI tools. Here's my detailed analysis: Todo List
✅ Positive Aspects1. Excellent Architecture & Design
2. Robust Tar Parser Implementation
3. Modern Browser API Usage
|
|
|
Both PyPI browsing tools (zip-wheel-explorer and pypi-changelog) previously
only worked with .whl files. Packages that ship only a source distribution
(e.g. apple-fm-sdk) failed with "no wheel found".
Add a fallback to the .tar.gz source distribution:
DecompressionStream, then parse the tar with a small parser that handles
ustar prefixes, GNU long names and PAX extended headers.
"-/" directory so paths align across versions when diffing.
https://claude.ai/code/session_018HTvSZHvL1T3EEZ7P8vbVy