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

Add upload-time support to links parsed from a JSON API #1023

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zanieb
Copy link

@zanieb zanieb commented Dec 20, 2023

Adds support for including the upload-time field from PyPI in the JSON output. This allows package managers to filter files by upload time.

For example:

❯ curl -s -H 'Accept: application/vnd.pypi.simple.v1+json' 'http://localhost:3141/root/pypi/+simple/black' | jq .files\[0]
{
  "filename": "black-18.3a0-py3-none-any.whl",
  "url": "http://localhost:3141/root/pypi/+f/718/3263650ba3071/black-18.3a0-py3-none-any.whl",
  "hashes": {
    "sha256": "7183263650ba3071034e90b40a1ea74abccbd32cf525cef6d7914479dbe7f2fb"
  },
  "requires-python": ">=3.6",
  "upload-time": "2018-03-14T21:30:34.781336Z"
}

I'd appreciate some guidance on where to add test coverage.

@fschulze
Copy link
Contributor

I would advice you to wait with this feature. I'm doing a complete refactor of the storage backend which will make this much easier. Currently it is very hard to get right with backward compatibility, replication and what have you.

@fschulze
Copy link
Contributor

Please keep this open though, it is a good use case to test my refactoring.

zanieb added a commit to astral-sh/packse that referenced this pull request Dec 21, 2023
@zanieb
Copy link
Author

zanieb commented Dec 21, 2023

No problem thanks for giving it a look.

I needed this personally, otherwise my package manager tests skip all of the wheels :) but I can just install from my fork for now.

Let me know if you need anything.

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.

None yet

2 participants