Skip to content
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

Provenance retrieval route #16778

Merged
merged 19 commits into from
Oct 3, 2024
Merged

Conversation

woodruffw
Copy link
Member

@woodruffw woodruffw commented Sep 23, 2024

WIP, not ready for review yet. This has two three functional changes:

  • Removes Provenance.provenance_digest, since the latest PEP 740 language doesn't include it
  • Adds an internal route (/_/provenance/{filename}/) for retrieving a file's provenance, if it exists
  • Enables provenance persistence

That route will be accessible, but isn't linked to any of the index representations in this PR. I'll do that with the final PR, which will be built off of #16624.

Signed-off-by: William Woodruff [email protected]

The latest PEP 740 language doesn't include this,
so we don't need it.

Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
@woodruffw woodruffw self-assigned this Sep 23, 2024
@woodruffw woodruffw marked this pull request as ready for review September 23, 2024 19:14
@woodruffw woodruffw requested a review from a team as a code owner September 23, 2024 19:14
@woodruffw woodruffw changed the title WIP: Provenance retrieval route Provenance retrieval route Sep 23, 2024
@woodruffw woodruffw mentioned this pull request Sep 23, 2024
11 tasks
Signed-off-by: William Woodruff <[email protected]>
Copy link
Member

@miketheman miketheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't super familiar with this, so it took me a bit longer than I expected, but maybe that's a good thing!

I left in a bunch of notes, let me know if anything doesn't make sense.



def _select_content_type(request: Request) -> str:
offers = request.accept.acceptable_offers(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: unrelated to this change, I wonder if this pattern is relatively easy to replace with our use of deprecated .best_match

woodruffw and others added 2 commits October 3, 2024 09:23
@woodruffw woodruffw requested a review from miketheman October 3, 2024 13:34
@miketheman miketheman merged commit 50a58f3 into pypi:main Oct 3, 2024
18 checks passed
@miketheman miketheman deleted the ww/no-prov-digest branch October 3, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants