-
Notifications
You must be signed in to change notification settings - Fork 967
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
JSON API gives different results depending on HTTP client #1996
Comments
About 24 hours later, |
I'm pretty sure that this is just going to be down to the I'm going to go ahead and close this, we're unlikely to solve this since it'll go away once Legacy upload goes away. |
@dstufft Do you recommend uploading to Warehouse at this point? |
@jbarlow83 Yes, and both twine and Python default to it in their latest version if you haven't overridden it in your |
After updating my package in production on legacy PyPI, the warehouse package shows the current version, but the PyPI JSON API seems to return stale results depending on which HTTP client queries it.
*When I use
urlopen()
(Py3) to access https://pypi.io/package/json, the JSON reports the results for the previous version rather than latest.*When I use
curl
to access the JSON page, it also reports the old version.*Unexpectedly, when I access https://pypi.io/package/json in my web browser, it reports the latest version. Therefore, it appears that pypi.io only responds with the latest version when more detailed HTTP headers are provided.
I have not found any documentation that what this header should be.
This behavior has broken some of my build scripts that worked about a month ago. (I can check exact dates if this is useful for bisection.) My Travis CI build process and my local box both exhibit the behavior, so it is quite unlikely that it is a local machine cache issue on my end.
To reproduce:
-use twine to upload a new version of a test package, targeting legacy PyPI
-wait for warehouse's rich HTML to reflect that the new package is available
-check the same JSON page in a web browser, and it shows the current package, as expected
-
curl https://pypi.io/package/json
and it incorrectly reports the old packageThe text was updated successfully, but these errors were encountered: