-
Notifications
You must be signed in to change notification settings - Fork 75
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
Update pkginfo library to support newer python packages #683
base: main
Are you sure you want to change the base?
Conversation
Might need some fields added as well |
6a473a1
to
2c7bd88
Compare
I need to find a package that uses metadata version 2.3 and also uses this dynamic field, so that we can properly test it. edit: or maybe we need to make one. Is there anything in pulp_python currently like the test I added to pulp_rpm that uses a package constructed specifically to exercise every field available, and then checks the API response once uploaded / synced to verify that they match? |
Looks like the |
No we don't have any dynamic fixtures to create packages with specified fields. |
I don't mean dynamic fixtures necessarily, even a pre-generated package in the fixtures would be fine But I assume the answer there is also probably no. That's fine, I can make do |
pulp_python/app/models.py
Outdated
@@ -178,6 +182,7 @@ class PythonPackageContent(Content): | |||
classifiers = models.JSONField(default=list) | |||
project_urls = models.JSONField(default=dict) | |||
description_content_type = models.TextField() | |||
dynamic = models.TextField() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are missing provides_extra
. Added in 2.1. Also, can we reformat the list to be like pkginfo? https://github.com/jwilk-mirrors/python-pkginfo/blob/master/pkginfo/distribution.py#L124
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. For provides_extra
, are we going to be missing metadata for existing packages? I don't think we ever had a problem with rejection of metadata 2.1 packages as we did with 2.3
How do you want to deal with that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I filed pypi/warehouse#16190 because I'm having difficulty figuring out exactly what these fields are meant to look like. The core metadata specification describes how they're represented in the metadata files within a package, not how they're represented on PyPI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. For
provides_extra
, are we going to be missing metadata for existing packages? I don't think we ever had a problem with rejection of metadata 2.1 packages as we did with 2.3How do you want to deal with that?
We might need to create a new endpoint that runs a task to fix bad metadata. Unless you are uploading every package most python content will have incorrect metadata because syncing doesn't individually check the metadata for each package. Currently we take the latest's package metadata and re-use it for every version of that package.
f0f7867
to
c490361
Compare
closes #682