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

Return "versions" on legacy JSON api #12079

Closed
wants to merge 1 commit into from
Closed

Return "versions" on legacy JSON api #12079

wants to merge 1 commit into from

Conversation

dimbleby
Copy link

Anticipating the removal of deprecated "releases": retain information
about the available versions of a package.

Fixes #11991

@dimbleby dimbleby requested a review from a team as a code owner August 14, 2022 11:43
Anticipating the removal of deprecated "releases": retain information
about the available versions of a package.
@@ -173,6 +173,7 @@ def _json_data(request, project, release, *, all_releases):

if all_releases:
data["releases"] = releases
data["versions"] = sorted(releases)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess a question here is whether we want to align the version-less and the versioned urls and include the versions key on all responses like we used to include the releases key.

Copy link
Author

@dimbleby dimbleby Aug 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way I'm thinking about it is that the version-less endpoint helps you to find details for particular versions (and also provides details for whatever the latest version is). Then the versioned endpoints just give versioned information.

Certainly poetry doesn't have a use case for getting the full version list from a versioned endpoint, so I'm comfortable leaving it off.

Say if you want it in, presumably it's just a case of unindenting this line...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reckon it only makes sense for the unversioned URL.

@dstufft
Copy link
Member

dstufft commented May 23, 2023

See #11991 (comment)

@dstufft dstufft closed this May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

don't remove the ability to get package versions via the JSON API
3 participants