-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix(repositories): use urls
for versioned JSON API instead of releases
#5972
fix(repositories): use urls
for versioned JSON API instead of releases
#5972
Conversation
Tests pass (minus the flaky |
I think the Probably the json files under |
Agree, though
So we will probably need to change that too. |
I don't think so - I think that is looking at the reponse from the non-versioned page, which continues to include this information |
Oh yeah, https://github.com/pypi/warehouse/pull/11775/files#diff-beb4788f749d9d561005b6542d39b9f7d6f0ed2e7e9bd8b614673294aab9b488R188-R189 you're right indeed, |
Updated the PR to:
|
urls
for JSON API instead of releases
urls
for versioned JSON API instead of releases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and also tested this locally 🏅 🚀
Can you please prepare a backport to 1.1?
Yes, PR is #5973, just waiting for CI to pass. |
Updated to 1.1.14 and still doing it. Is there something to modify to actually fix the issue locally? |
Yes, you have to clear Poetry's cache first: poetry cache clear pypi --all |
Yeah it works thx. I found the answer in one of the issues. |
Sorry to jump onto this thread but is there anywhere to see when a new beta release will be cut with this very critical fix? We'd prefer to use a released version instead of building from main, as I'm sure many other folks would. |
A new beta for |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pull Request Check List
Resolves: #5967
Resolves: #5970
Updated documentation for changed code.Not applicableWhen retrieving package metadata for a specific version from
pypi.org
JSON API, Poetry currently relies on areleases
keys to look for the correct version based on the URL.Following pypi/warehouse#11775,
releases
has been removed from/pypi/<package_name>/<version>/json
endpoints, so Poetry can't pick up this metadata anymore.There's no real reason to use
releases
, sinceurls
is also available, and has the advantage of directly returning the version we are looking for (so instead of checking fordata["releases"][version]
, we directly access the version we are looking for indata["urls"]
).Note: Given that this makes Poetry locking mechanism broken on all released versions (not only on
master
), this would probably require a backport to the1.1
branch, even if it is mostly unmainted. Startedhttps://github.com/mkniewallner/poetry/commits/fix/fix-releases-key-pypi-repository-1.1 for that.