fix(repositories): use urls for versioned JSON API instead of releases#5972
fix(repositories): use urls for versioned JSON API instead of releases#5972finswimmer merged 3 commits intopython-poetry:masterfrom mkniewallner:fix/fix-releases-key-pypi-repository
urls for versioned JSON API instead of releases#5972Conversation
|
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 releasesurls for versioned JSON API instead of releases
finswimmer
left a comment
There was a problem hiding this comment.
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.orgJSON API, Poetry currently relies on areleaseskeys to look for the correct version based on the URL.Following pypi/warehouse#11775,
releaseshas been removed from/pypi/<package_name>/<version>/jsonendpoints, so Poetry can't pick up this metadata anymore.There's no real reason to use
releases, sinceurlsis 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.1branch, even if it is mostly unmainted. Startedhttps://github.com/mkniewallner/poetry/commits/fix/fix-releases-key-pypi-repository-1.1 for that.