Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide structured JSON output for pip index versions #13194

Merged
merged 9 commits into from
Mar 3, 2025

Conversation

KrishanBhasin
Copy link
Contributor

The first part of #13188, providing a structured JSON-formatted output for pip index versions command.

Usage:

❯ pip index versions build --json
{"name": "build", "versions": ["1.2.2.post1", "1.2.2", "1.2.1", "1.1.1", "1.0.3", "1.0.0", "0.10.0", "0.9.0", "0.8.0", "0.7.0", "0.6.0.post1", "0.5.1", "0.5.0", "0.4.0", "0.3.1.post1", "0.3.1", "0.3.0", "0.2.1", "0.2.0", "0.1.0", "0.0.4", "0.0.3.1", "0.0.2", "0.0.1"], "latest": "1.2.2.post1", "installed_version": "1.2.2.post1"}

which is properly formatted JSON - it prettifies to:

{
  "name": "build",
  "versions": [
    "1.2.2.post1",
    "1.2.2",
    "1.2.1",
    "1.1.1",
    "1.0.3",
    "1.0.0",
    "0.10.0",
    "0.9.0",
    "0.8.0",
    "0.7.0",
    "0.6.0.post1",
    "0.5.1",
    "0.5.0",
    "0.4.0",
    "0.3.1.post1",
    "0.3.1",
    "0.3.0",
    "0.2.1",
    "0.2.0",
    "0.1.0",
    "0.0.4",
    "0.0.3.1",
    "0.0.2",
    "0.0.1"
  ],
  "latest": "1.2.2.post1",
  "installed_version": "1.2.2.post1"
}

@KrishanBhasin KrishanBhasin changed the title Kb/f/pip index versions json Provide structured JSON output for pip index versions Jan 30, 2025
@KrishanBhasin KrishanBhasin marked this pull request as ready for review January 31, 2025 05:27
@krishanbhasin-px
Copy link
Contributor

krishanbhasin-px commented Mar 3, 2025

hey there, just wanted to gently ask if there's anything else this PR needs in order to proceed, alongside the related #13219?

@notatallshaw
Copy link
Member

notatallshaw commented Mar 3, 2025

hey there, just wanted to gently ask if there's anything else this PR needs in order to proceed, alongside the related #13219?

I don't think there's anything waiting on you (it looks like you've addressed or responded to all review comments), a pip maintainer needs to take the time and responsibility to review, approve, and merge the PR.

I believe we are all volunteers doing this in our free time, and the cost to making mistakes in pip is somewhat high. Which can unfortunately leave PRs in a waiting state for longer than ideal.

I've already added both PRs to the 25.1 milestone so they're not forgotten. I've not reviewed this PR, but if we get close to 25.1 and it's still in need for a reviewer I will take a look.

@krishanbhasin-px
Copy link
Contributor

No worries! I just wanted to check I hadn't missed something - I didn't mean to be putting pressure on anyone.

Thank you for adding the tags, and no rush from my side for anything on this.

@pfmoore
Copy link
Member

pfmoore commented Mar 3, 2025

Thanks for the reminder! This looks fine to me, you've addressed the points I raised so I'm happy to just merge this.

Thank you for the contribution 🙂

@pfmoore pfmoore merged commit c1100ee into pypa:main Mar 3, 2025
31 checks passed
@krishanbhasin-px krishanbhasin-px deleted the kb/f/pip-index-versions-json branch March 4, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants