Skip to content

purl-next: Collect PURLs for PyPI ecosystem #662

Closed

Description

@pombredanne

Create decentralized, distributed PURL metadata collection using CI/CD jobs - one ecosystem

Activity

  1. changed the title [-]purl-next: Collect PURL metadata for one ecosystem - 7[/-] [+]purl-next: Collect PURL metadata for ecosystems - 7[/+] on Aug 5, 2025
  2. changed the title [-]purl-next: Collect PURL metadata for ecosystems - 7[/-] [+]purl-next: Collect PURL metadata for PyPI ecosystems - 7[/+] on Aug 5, 2025
  3. moved this from Needs prep to In prep in 00-AboutCodePlanneron Aug 21, 2025
  4. changed the title [-]purl-next: Collect PURL metadata for PyPI ecosystems - 7[/-] [+]purl-next: Collect PURL metadata for PyPI ecosystems[/+] on Aug 21, 2025
  5. AyanSinhaMahapatra commented on Aug 25, 2025

    @AyanSinhaMahapatra
    Member

    The pypi miner code doesn't work at https://github.com/aboutcode-org/purldb/blob/main/minecode/miners/pypi.py#L53, fails with the following error:

    Fault: <Fault -32500: 'RuntimeError: PyPI no longer supports the XMLRPC list_packages method. Use JSON or Simple API instead. See https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods for more information.'>
    

    This is because the xmlrpc client and the API is deprecated, they have an API to get a list of all the packages and get package release info from https://pypi.org/simple/ (as mentioned in https://docs.pypi.org/api/index-api/) which supports JSON and HTML.
    This is possibly cached for fast downloads and is refreshed atleast once a day.

    See also https://peps.python.org/pep-0691/ where this was proposed and accepted. See also https://discuss.python.org/t/pep-691-json-based-simple-api-for-python-package-indexes/15553

    The raw JSON file with all package names (and _last-serial) is around 64 MB, and is quite fast/manageable to get all package names like this.

    There is also the library https://github.com/jwodder/pypi-simple with minimal dependencies that seems to do the same with a lot of extra added features for getting all available kinds of data from the index, which we can use as a dependency possibly or as a refinement.

    The X-PyPI-Last-Serial: and _last-serial fields seem nice if someone wants to optimize getting only the packages which had a release after the last sync quickly or quickly check for package updates for a specific version. But this is a refinement which doesn't seem to be required to get just the list of packages and their versions.

  6. moved this from In prep to In progress in 00-AboutCodePlanneron Sep 1, 2025
  7. moved this from In progress to Review ready in 00-AboutCodePlanneron Sep 3, 2025
  8. added a commit that references this issue on Sep 3, 2025
  9. changed the title [-]purl-next: Collect PURL metadata for PyPI ecosystems[/-] [+]purl-next: Collect PURLs for PyPI ecosystems[/+] on Sep 3, 2025
  10. changed the title [-]purl-next: Collect PURLs for PyPI ecosystems[/-] [+]purl-next: Collect PURLs for PyPI ecosystem[/+] on Sep 5, 2025
  11. AyanSinhaMahapatra commented on Sep 17, 2025

    @AyanSinhaMahapatra
    Member
  12. pombredanne commented on Sep 18, 2025

    @pombredanne
    MemberAuthor

    Thanks ... looking fine!

  13. moved this from Review ready to Done in 00-AboutCodePlanneron Sep 18, 2025
  14. moved this from Done to In validation in 00-AboutCodePlanneron Sep 18, 2025
  15. moved this from In validation to Validated in 00-AboutCodePlanneron Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions