Skip to content

Comments

chore: update get maintainers to use new JSON API field#1311

Merged
behnazh-w merged 1 commit intomainfrom
art1f1c3R/get-maintainers-update
Feb 24, 2026
Merged

chore: update get maintainers to use new JSON API field#1311
behnazh-w merged 1 commit intomainfrom
art1f1c3R/get-maintainers-update

Conversation

@art1f1c3R
Copy link
Member

@art1f1c3R art1f1c3R commented Feb 23, 2026

Summary

The updated PyPI JSON API now includes a field "ownership" that containers the maintainers of the package in the JSON result. This PR updates the PyPI Registry code to use this instead of parsing the package HTML page.

Description of changes

The "ownership" field containers the organization associated with a package, and then each user and role. For example, black@26.1.0 has this:

"ownership": {
        "organization": null,
        "roles": [
            {
                "role": "Owner",
                "user": "JelleZijlstra"
            },
            {
                "role": "Owner",
                "user": "ambv"
            },
            {
                "role": "Owner",
                "user": "cooperlees"
            },
            {
                "role": "Owner",
                "user": "willingc"
            },
            {
                "role": "Owner",
                "user": "zsolzsol"
            }
        ]
    }

It is much neater and reliable to use this as opposed to parsing the HTML page of a PyPI package. This PR updates the PyPIPackageJsonAsset to have the get_maintainers_of_package function as part of it instead of the PyPIRegistry object, since it is part of the JSON. It then updates all references and uses accordingly.

Checklist

  • I have reviewed the contribution guide.
  • My PR title and commits follow the Conventional Commits convention.
  • My commits include the "Signed-off-by" line.
  • I have signed my commits following the instructions provided by GitHub. Note that we run GitHub's commit verification tool to check the commit signatures. A green verified label should appear next to all of your commits on GitHub.
  • I have updated the relevant documentation, if applicable.
  • I have tested my changes and verified they work as expected.

Signed-off-by: Carl Flottmann <carl.flottmann@oracle.com>
@art1f1c3R art1f1c3R requested a review from behnazh-w as a code owner February 23, 2026 06:32
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 23, 2026
@art1f1c3R art1f1c3R self-assigned this Feb 23, 2026
@behnazh-w behnazh-w merged commit 53bda8d into main Feb 24, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants