Repository navigation
Closed
Description
pip download --dest /wheels pacparser
...
#9 2.340 Collecting pacparser
#9 2.343 Using cached pacparser-1.5.1.tar.gz (5.3 kB)
#9 2.348 Preparing metadata (setup.py): started
#9 2.950 Preparing metadata (setup.py): finished with status 'done'
#9 2.952 Discarding https://files.pythonhosted.org/packages/2f/c7/bde00009f89419d631784f272e2cb7b1196f48f42d412075f60c9a392469/pacparser-1.5.1.tar.gz (from https://pypi.org/simple/pacparser/): Requested pacparser from https://files.pythonhosted.org/packages/2f/c7/bde00009f89419d631784f272e2cb7b1196f48f42d412075f60c9a392469/pacparser-1.5.1.tar.gz has inconsistent version: expected '1.5.1', but metadata has '1.0.0'
#9 2.954 Using cached pacparser-1.5.0.tar.gz (5.2 kB)
#9 2.958 Preparing metadata (setup.py): started
#9 3.206 Preparing metadata (setup.py): finished with status 'done'
#9 3.208 Discarding https://files.pythonhosted.org/packages/cc/db/3ced25ba1b3fe50ee670b7bb0c145817b48b256b39698e07131bf499035c/pacparser-1.5.0.tar.gz (from https://pypi.org/simple/pacparser/): Requested pacparser from https://files.pythonhosted.org/packages/cc/db/3ced25ba1b3fe50ee670b7bb0c145817b48b256b39698e07131bf499035c/pacparser-1.5.0.tar.gz has inconsistent version: expected '1.5.0', but metadata has '1.0.0'
#9 3.210 Using cached pacparser-1.4.6.tar.gz (5.2 kB)
#9 3.214 Preparing metadata (setup.py): started
#9 3.461 Preparing metadata (setup.py): finished with status 'done'
#9 3.463 Discarding https://files.pythonhosted.org/packages/b0/6d/d2d39dc9e849c76236e586af61e93f71f09e164bfbcaad56f9b34fc806fd/pacparser-1.4.6.tar.gz (from https://pypi.org/simple/pacparser/): Requested pacparser from https://files.pythonhosted.org/packages/b0/6d/d2d39dc9e849c76236e586af61e93f71f09e164bfbcaad56f9b34fc806fd/pacparser-1.4.6.tar.gz has inconsistent version: expected '1.4.6', but metadata has '1.0.0'
#9 3.465 Using cached pacparser-1.4.5.tar.gz (5.3 kB)
#9 3.469 Preparing metadata (setup.py): started
#9 3.741 Preparing metadata (setup.py): finished with status 'done'
#9 3.743 Discarding https://files.pythonhosted.org/packages/7a/ce/2ffcef5537d7f5c7b04a281852612f4419707c665ef0caffb90c8d351fc2/pacparser-1.4.5.tar.gz (from https://pypi.org/simple/pacparser/): Requested pacparser from https://files.pythonhosted.org/packages/7a/ce/2ffcef5537d7f5c7b04a281852612f4419707c665ef0caffb90c8d351fc2/pacparser-1.4.5.tar.gz has inconsistent version: expected '1.4.5', but metadata has '1.0.0'
#9 3.745 Using cached pacparser-1.4.4.tar.gz (5.3 kB)
#9 3.749 Preparing metadata (setup.py): started
#9 4.025 Preparing metadata (setup.py): finished with status 'done'
#9 4.026 Discarding https://files.pythonhosted.org/packages/44/5a/de59d93bc1c017ab829bd6115b4abff13552b7c90a90ddf303d96d9db868/pacparser-1.4.4.tar.gz (from https://pypi.org/simple/pacparser/): Requested pacparser from https://files.pythonhosted.org/packages/44/5a/de59d93bc1c017ab829bd6115b4abff13552b7c90a90ddf303d96d9db868/pacparser-1.4.4.tar.gz has inconsistent version: expected '1.4.4', but metadata has '1.0.0'
#9 4.028 Using cached pacparser-1.4.3.tar.gz (5.3 kB)
#9 4.033 Preparing metadata (setup.py): started
#9 4.322 Preparing metadata (setup.py): finished with status 'done'
#9 4.323 Discarding https://files.pythonhosted.org/packages/57/85/ead715e3eca6fb97a50948acef97f859f8a259f0bc93f9b8a3895b90d2fd/pacparser-1.4.3.tar.gz (from https://pypi.org/simple/pacparser/): Requested pacparser from https://files.pythonhosted.org/packages/57/85/ead715e3eca6fb97a50948acef97f859f8a259f0bc93f9b8a3895b90d2fd/pacparser-1.4.3.tar.gz has inconsistent version: expected '1.4.3', but metadata has '1.0.0'
#9 4.329 Using cached pacparser-1.4.2.tar.gz (5.2 kB)
#9 4.330 Preparing metadata (setup.py): started
#9 4.602 Preparing metadata (setup.py): finished with status 'done'
#9 4.603 Discarding https://files.pythonhosted.org/packages/00/dc/69d2c0e17afbfe67173dc3d1ca52c7f8267712fb4bb62c0af3d457a96a6c/pacparser-1.4.2.tar.gz (from https://pypi.org/simple/pacparser/): Requested pacparser from https://files.pythonhosted.org/packages/00/dc/69d2c0e17afbfe67173dc3d1ca52c7f8267712fb4bb62c0af3d457a96a6c/pacparser-1.4.2.tar.gz has inconsistent version: expected '1.4.2', but metadata has '1.0.0'
#9 4.605 Using cached pacparser-1.4.1.tar.gz (5.2 kB)
#9 4.609 Preparing metadata (setup.py): started
#9 4.849 Preparing metadata (setup.py): finished with status 'done'
#9 4.851 Discarding https://files.pythonhosted.org/packages/ad/10/45fddc52d385c1b6675d92be1b59f77fa4f5c0679e065ed86f2d2b420e7f/pacparser-1.4.1.tar.gz (from https://pypi.org/simple/pacparser/): Requested pacparser from https://files.pythonhosted.org/packages/ad/10/45fddc52d385c1b6675d92be1b59f77fa4f5c0679e065ed86f2d2b420e7f/pacparser-1.4.1.tar.gz has inconsistent version: expected '1.4.1', but metadata has '1.0.0'
#9 4.853 Using cached pacparser-1.4.0.tar.gz (5.2 kB)
#9 4.857 Preparing metadata (setup.py): started
#9 5.096 Preparing metadata (setup.py): finished with status 'done'
#9 5.098 Discarding https://files.pythonhosted.org/packages/f4/e3/a4ab7a5abdf569bb55095cd3c0e9402e85d12adfebca724daf41009b9c1f/pacparser-1.4.0.tar.gz (from https://pypi.org/simple/pacparser/): Requested pacparser from https://files.pythonhosted.org/packages/f4/e3/a4ab7a5abdf569bb55095cd3c0e9402e85d12adfebca724daf41009b9c1f/pacparser-1.4.0.tar.gz has inconsistent version: expected '1.4.0', but metadata has '1.0.0'
#9 5.099 Using cached pacparser-1.3.9.tar.gz (5.2 kB)
#9 5.104 Preparing metadata (setup.py): started
#9 5.350 Preparing metadata (setup.py): finished with status 'done'
#9 5.351 Discarding https://files.pythonhosted.org/packages/68/72/4ffa8575893c3a28d63709de5aa30b41d8e8ccb977c31d416455b5721101/pacparser-1.3.9.tar.gz (from https://pypi.org/simple/pacparser/): Requested pacparser from https://files.pythonhosted.org/packages/68/72/4ffa8575893c3a28d63709de5aa30b41d8e8ccb977c31d416455b5721101/pacparser-1.3.9.tar.gz has inconsistent version: expected '1.3.9', but metadata has '1.0.0'
#9 5.353 Using cached pacparser-1.3.7.tar.gz (4.0 kB)
#9 5.356 Preparing metadata (setup.py): started
#9 5.563 Preparing metadata (setup.py): finished with status 'done'
#9 5.565 Saved /wheels/pacparser-1.3.7.tar.gz
#9 5.566 Successfully downloaded pacparser
#9 6.127 Processing /wheels/pacparser-1.3.7.tar.gz
#9 6.127 File was already downloaded /wheels/pacparser-1.3.7.tar.gz
Dockerfile for reproducing this:
docker build -f Dockerfile.pacparser . -o wheels --progress=plain
Metadata
Metadata
Assignees
Labels
No labels
Activity
manugarg commentedon Aug 22, 2026
This was related to sdist missing version.mk, #255 will fix this as well.
Add sdist metadata regression test and fix version sanitization (#256)
manugarg commentedon Aug 22, 2026
Thanks for the report and the minimal repro.
Root cause: pip prepares an sdist's metadata by re-running
setup.pyinside the extracted archive, where there is no git metadata. The 1.3.9–1.5.1 sdists also shipped noversion.mkpinning the version, sopacparser_version()fell back to its1.0.0default and pip discarded each file as "inconsistent version", ending up on 1.3.7. (The PKG-INFO baked in at build time was correct, but pip regenerates it at install time — which is why only the.tar.gzfiles were affected: wheels are prebuilt in CI, where git is available.)Fix:
main): the sdist now ships the C sources plus aversion.mkpinning the version, so metadata preparation works without git — and the sdist can build the extension on its own.sanitize_version()now handles exact tags (v1.5.2→1.5.2), and a regression test (tests/test_sdist_metadata.py, also run in CI) re-runsegg_infoin a git-free copy of the sdist and asserts the regenerated metadata version matches the archive name.1.5.2 has been released with the fix:
pip download pacparser(even with--no-binary :all:) now fetches 1.5.2 with no discarding cascade, and the sdist installs cleanly from source.The 1.3.9–1.5.1 sdists can't be repaired in place (PyPI doesn't allow replacing files of a published release), but they're inert now: pip prefers 1.5.2, and the binary wheels of those versions still work fine.