-
Notifications
You must be signed in to change notification settings - Fork 989
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
metadata: initial PEP 753 bits #17470
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: William Woodruff <william@trailofbits.com>
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.
LGTM aside from one nit!
Signed-off-by: William Woodruff <william@trailofbits.com>
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.
LGTM, you have linting errors now though.
🤦 The PyPUG URL is too long for the linting rules. I'll swap it with the PEP URL, since that one links to the PyPUG one anyways. |
Signed-off-by: William Woodruff <william@trailofbits.com>
This is a pretty small change, to get some initial bits of PEP 753 into Warehouse.
In particular, the only real functional change here is the addition of the
metadata.normalize_project_url_label
helper and its use inRelease.urls
(instead of the previous ad-hoc normalization). This doesn't actually change the presentation based on the normalized labels (yet!) -- I'll do that in a follow-up.The other changes in this PR are mostly auto-formatting (I can remove these if desired), as well as fixing an import cycle between
warehouse.forklift.metadata
andwarehouse.packaging.models
-- I fixed the latter by separatingDynamicFieldsEnum
into a DB-levelENUM
type in themodels
, which gets populated from data stored inforklift.metadata
. That keeps the import flow unidirectional and seems conceptually consistent to me, versus importing a DB model intoforklift.metadata
🙂