-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
APIThis issue relates to Warehouse client APIThis issue relates to Warehouse client API
Description
A design goal is to minimize the required client configuration. In practice I'm hoping I won't have to store package base directory ('packages/' on files.pythonhosted.org) in the configuration.
The plan is to integrate tuf into pip in a place where we get a Link object which contains among other things the full url of the file to be downloaded and helper properties for parsing it. The issue is how to extract the TUF metadata name from the url?
Example URL:
https://files.pythonhosted.org/packages/ca/ab/5e004afa025a6fb640c6e983d4983e6507421ff01be224da79ab7de7a21f/Django-3.0.8-py3-none-any.whl#sha256=5457fc953ec560c5521b41fad9e6734a4668b7ba205832191bbdff40ec61073c
We want to extract
ca/ab/5e004afa025a6fb640c6e983d4983e6507421ff01be224da79ab7de7a21f/Django-3.0.8-py3-none-any.whl
- With knowledge of base package directory this is easy... Should warehouse include that info in custom metadata? or can we just assume it's always "packages/"?
- Another option is to define that Metadata name is the filename without fragments with enough preceding path components to form the hash: this assumes we know how long the hash is (either warehouse must to tell us or we are not future proof for hash length changes)
- Alternatively define that Metadata name is the filename without fragments with 3 preceding directories -- this is not great for future proofing (but I have no idea if the three directory levels could in practice become too few in the future)
Metadata
Metadata
Assignees
Labels
APIThis issue relates to Warehouse client APIThis issue relates to Warehouse client API