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 support for PEP 770 #230

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

sethmlarson
Copy link

@sethmlarson sethmlarson commented Feb 12, 2025

Closes #228, PEP 770 is nearly provisional. Will update this thread once the PEP is provisional. Because there's no special "negative case" I didn't include an "invalid-examples" test, should I be adding one? Also didn't add an entry to the changelog because it wasn't mentioned in the contributing guide, let me know if I have something to do there too.

@henryiii
Copy link
Collaborator

henryiii commented Feb 12, 2025

Tests will be broken until #229 or #226 goes in. Can we validate the string, perhaps? That would provide a negative example. Specifically, these are in the PEP:

[project]
sbom-files = ["..\bom.json"]

[project]
sbom-files = ["bom{.json*"]

Edit: this would be fine as a followup, unless we happen to have a validator for this already.

We could also put in

[project]
name = "example"
version = "1.2.3"
sbom-files ="sboms/bom.cdx.json"

as a negative example. IIRC we manually update the changelog before release, so don't think anything is required there. But @abravalheri does releases, so not sure.

@sethmlarson
Copy link
Author

sethmlarson commented Feb 12, 2025

@henryiii Those are good suggestions, if I add a validator for the values I can copy that to license-files too (which makes me think it should be follow-up?)

I'll add that as a negative example to show we're intentionally not supporting strings.

@henryiii
Copy link
Collaborator

Yes, reusing validators is good. ;)

I can see if I can make a PR for pyproject-metadata.

@henryiii
Copy link
Collaborator

henryiii commented Feb 14, 2025

@sethmlarson I don't see dynamic listed in the PEP. Is the new field allowed to be listed in pyproject.dynamic? Separately, is it allowed in the Dynamic metadata field (meaning it can differ between the SDist and the wheel)? I think the answer is yes since that's the default for everything other than name/Name and Version?

Edit: looks like it based on the discussion thread. I think I missed license-files in Dynamic before in pyproject-metadata, as well.

Edit 2: Looks like you've listed it here in dynamic, I think that answers my question, at least about dynamic, I think that answers it for Dynamic as well.

PR at pypa/pyproject-metadata#225.

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.

[FR] Support PEP 770
2 participants