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
Implement 'latest' API and release-view endpoints #8615
Commits on Jan 22, 2021
-
Add 'latest' redirect to main project view
Need to add trailing-slash redirect, also.
Configuration menu - View commit details
-
Copy full SHA for cefbbce - Browse repository at this point
Copy the full SHA cefbbceView commit details -
Switch to HTTP 307 for the 'latest' redirect
Always want the browser to recheck this endpoint, in case the redirect target changes.
Configuration menu - View commit details
-
Copy full SHA for d995624 - Browse repository at this point
Copy the full SHA d995624View commit details -
Fix routes-check test and add latest_slash
Still need to actually test the latest logic.
Configuration menu - View commit details
-
Copy full SHA for 1efceae - Browse repository at this point
Copy the full SHA 1efceaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae850ae - Browse repository at this point
Copy the full SHA ae850aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c7818c - Browse repository at this point
Copy the full SHA 9c7818cView commit details -
Switch latest from a redirect to /pypi/{name}/json, and instead duplicate the version-search logic. This should make `latest` robust against any future changes to the `json_project` logic. Implement latest-stable and latest-unstable logic.
Configuration menu - View commit details
-
Copy full SHA for 8a9bde9 - Browse repository at this point
Copy the full SHA 8a9bde9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70d7204 - Browse repository at this point
Copy the full SHA 70d7204View commit details -
Configuration menu - View commit details
-
Copy full SHA for 187addb - Browse repository at this point
Copy the full SHA 187addbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 728c6d4 - Browse repository at this point
Copy the full SHA 728c6d4View commit details -
Complete latest tests, add unstable tests
Need to fix unstable query (or test?), is redirecting to the most recent stable version instead of most recent prerelease for project_with_pre
Configuration menu - View commit details
-
Copy full SHA for b961397 - Browse repository at this point
Copy the full SHA b961397View commit details -
Reorder project_with_pre release creation
Apparently, the _pypi_ordering is a function of the order in which Releases are added to a Project. Seems potentially brittle.
Configuration menu - View commit details
-
Copy full SHA for ab7f284 - Browse repository at this point
Copy the full SHA ab7f284View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8967523 - Browse repository at this point
Copy the full SHA 8967523View commit details -
Configuration menu - View commit details
-
Copy full SHA for 75b19bc - Browse repository at this point
Copy the full SHA 75b19bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for be00837 - Browse repository at this point
Copy the full SHA be00837View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ee0178 - Browse repository at this point
Copy the full SHA 0ee0178View commit details -
Configuration menu - View commit details
-
Copy full SHA for eaa9971 - Browse repository at this point
Copy the full SHA eaa9971View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f1efaa - Browse repository at this point
Copy the full SHA 0f1efaaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 51662d4 - Browse repository at this point
Copy the full SHA 51662d4View commit details
Commits on Jan 27, 2021
-
[skip ci] 2) Draft latest JSON doc chunk [skip ci] 3) Add docs for 'latest' web UI endpoints Plus a bit of tweaking to the JSON docs language.
Configuration menu - View commit details
-
Copy full SHA for 5823118 - Browse repository at this point
Copy the full SHA 5823118View commit details
Commits on Apr 20, 2021
-
Merge remote-tracking branch 'upstream/main' into latest-json
Refreshing base branch underneath the PR.
Configuration menu - View commit details
-
Copy full SHA for 36a9be3 - Browse repository at this point
Copy the full SHA 36a9be3View commit details
Commits on Apr 21, 2021
-
Convert 'latest' JSON endpoint to direct result
Not that bad! The sqlalchemy magic is pretty darn intuitive!
Configuration menu - View commit details
-
Copy full SHA for 1da81c2 - Browse repository at this point
Copy the full SHA 1da81c2View commit details -
Rework stable and unstable to direct returns.
Getting errors on local tests; will see how CI does.
Configuration menu - View commit details
-
Copy full SHA for 930a66d - Browse repository at this point
Copy the full SHA 930a66dView commit details
Commits on Apr 22, 2021
-
Refactor latest version lookup for missing release
Depending on how the various version lookups are called, project.latest_version may itself return None. So, breaking up the attribute access chain will be more robust. Could have used .getattr() here, but stringifying the member names in the actual codebase (as opposed to in test code) seemed imprudent.
Configuration menu - View commit details
-
Copy full SHA for d81ecc9 - Browse repository at this point
Copy the full SHA d81ecc9View commit details -
Switch 'latest JSON' tests to mocked responses
Instead of testing them as redirects, as originally implemented, they are now tested via catching the call-through to the underlying json_release() JSON API function.
Configuration menu - View commit details
-
Copy full SHA for ede8041 - Browse repository at this point
Copy the full SHA ede8041View commit details -
Merge remote-tracking branch 'upstream/main' into latest-json
Refresh branch base.
Configuration menu - View commit details
-
Copy full SHA for b87a826 - Browse repository at this point
Copy the full SHA b87a826View commit details
Commits on Apr 23, 2021
-
Refactor check functions to class-scope fixtures
Fixtures allow monkeypatching; making them class-scope keeps their definitions closer to the tests and prevents (possibly undesirably) re-use elsewhere. If they end up needed elsewhere, they can easily be refactored out to conftest.py.
Configuration menu - View commit details
-
Copy full SHA for c57792c - Browse repository at this point
Copy the full SHA c57792cView commit details -
Switch JSON database query to .one()
As noted in discussion in pypi#8615, zero or multiple query results in this case are a pathological scenario.
Configuration menu - View commit details
-
Copy full SHA for ed0baa1 - Browse repository at this point
Copy the full SHA ed0baa1View commit details
Commits on Apr 27, 2021
-
Switch 'latest' properties to return Releases
No failures introduced to test suite on the change.
Configuration menu - View commit details
-
Copy full SHA for 1cb61d6 - Browse repository at this point
Copy the full SHA 1cb61d6View commit details
Commits on May 17, 2021
-
Configuration menu - View commit details
-
Copy full SHA for ee873dd - Browse repository at this point
Copy the full SHA ee873ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for ea27efa - Browse repository at this point
Copy the full SHA ea27efaView commit details -
Configuration menu - View commit details
-
Copy full SHA for b1dfd94 - Browse repository at this point
Copy the full SHA b1dfd94View commit details -
Revise JSON docs to remove 'redirect' mentions
JSON API views now directly return, rather than redirecting. Per pypi#8615 (review)
Configuration menu - View commit details
-
Copy full SHA for 0306080 - Browse repository at this point
Copy the full SHA 0306080View commit details -
Add guard against a nonexisting 'latest' release
In the 'latest' views of views.py, pre-fetch the release from the project first, then handle appropriately given the possibility for None. Addresses the following PR review comments: - https://github.com/pypa/warehouse/pull/8615/files/ed0baa180d8bd628e80fcd37450c9d4d60dd5b9d?file-filters%5B%5D=.py#r619663916 - https://github.com/pypa/warehouse/pull/8615/files/ed0baa180d8bd628e80fcd37450c9d4d60dd5b9d?file-filters%5B%5D=.py#r619663799 - https://github.com/pypa/warehouse/pull/8615/files/ed0baa180d8bd628e80fcd37450c9d4d60dd5b9d?file-filters%5B%5D=.py#r619663874
Configuration menu - View commit details
-
Copy full SHA for dc83830 - Browse repository at this point
Copy the full SHA dc83830View commit details -
Add 'latest' views tests for no-release projects
For completeness, and to satisfy 100% coverage requirement.
Configuration menu - View commit details
-
Copy full SHA for a8a0cf4 - Browse repository at this point
Copy the full SHA a8a0cf4View commit details -
Streamline release handling in latest JSON calls
Addresses pypi#8615 (comment). The database queries inline here may be duplicative; will check in a subsequent commit.
Configuration menu - View commit details
-
Copy full SHA for 9415413 - Browse repository at this point
Copy the full SHA 9415413View commit details -
Remove redundant dbquery in 'latest' JSON
The 'latest' members off of the Project model now return fully-realized Release instances, making a subsequent database call unnecessary.
Configuration menu - View commit details
-
Copy full SHA for 688d842 - Browse repository at this point
Copy the full SHA 688d842View commit details
Commits on May 18, 2021
-
Merge pull request #1 from bskinn/latest-json-pr-review
Latest json pr review
Configuration menu - View commit details
-
Copy full SHA for 58b13aa - Browse repository at this point
Copy the full SHA 58b13aaView commit details -
Add sidestep for pypa/pip#9644
Should be removed before merging pypi#8615
Configuration menu - View commit details
-
Copy full SHA for c6f664a - Browse repository at this point
Copy the full SHA c6f664aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 715816c - Browse repository at this point
Copy the full SHA 715816cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b66109f - Browse repository at this point
Copy the full SHA b66109fView commit details
Commits on May 19, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 9957daa - Browse repository at this point
Copy the full SHA 9957daaView commit details
Commits on May 28, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 4f0b075 - Browse repository at this point
Copy the full SHA 4f0b075View commit details