-
Notifications
You must be signed in to change notification settings - Fork 0
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
Latest json pr review #1
Conversation
No failures introduced to test suite on the change.
JSON API views now directly return, rather than redirecting. Per pypi#8615 (review)
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
For completeness, and to satisfy 100% coverage requirement.
Addresses pypi#8615 (comment). The database queries inline here may be duplicative; will check in a subsequent commit.
The 'latest' members off of the Project model now return fully-realized Release instances, making a subsequent database call unnecessary.
(I'm not sure if you expect me to review this PR or if we continue the work on the main PR) |
@ewjoachim Thanks! I thought that setting it up this way might provide cleaner diffs, with this PR showing just the changes I'd made per your reviews. Not sure if it's a standard workflow or not. In any event, I don't have a preference for whether review happens here or back on the main PR... I could see it making more sense to have the review on the main PR, though, so that all the review is collected in one place. If you agree, I'll go ahead and just merge this PR so that the changes propagate back to pypa#8615. |
No problem, let's do that on the main PR. A few "classical" ways to solve this:
So all in all, don't bother too much, stacking git commits in a single PR is usually enough even when there are multiple rounds of review. |
Ahh, I hadn't fully realized how |
Merge changes from Apr 2021 @ewjoachim reviews.