Closed pilosus closed 1 year ago
There's a proposal to user versions
attribute for JSON API:
https://github.com/pypi/warehouse/issues/11991
https://github.com/pypi/warehouse/pull/12079
But it's still not released. There's also a concern that the project endpoint in JSON API may return too much (e.g. project's long description), which is bad for performance. So the Simple API is preferrable.
PEP 658 also defines an attribute for metadata for Simple API. PEP 691 defines an optional key dist-info-metadata
in JSON response for Simple API to indicate if a separate metadata file is available. This way we could switch over JSON-based Simple API completely.
When parsing versions from Simple API, we must rely on PEP-427 that defines filename naming conventions.
The most up-to-date information on Python distribution files can be found under: https://packaging.python.org/en/latest/specifications/
See Package Distribution File Formats
for sdist
and wheel
files specs
Recently PyPI's JSON API deprecated releases key in project's response:
That breaks versions resolution built in the checker for Python deps.
There are two ways to fix that:
Instead of getting all available releases from JSON API's releases section:
Use:
get all available files, parse versions from files, calculate version, then obtain meta from JSON API.
Pro: will fix the issue Contra:
--requirements
option), support only license name to license category functionality (i.e. take in license names as with--external
option).Pro:
Contra: