-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 initial support for license expression (PEP 639) #4706
base: main
Are you sure you want to change the base?
Conversation
4c8ccfb
to
1237a7d
Compare
1237a7d
to
93d0c67
Compare
Hi @cdce8p thank you very much for having a look on this. We probably have to organise so that PEP 639 lands after PEP 685 implementation (ideally we want a couple of days/weeks between the two so that users have time to report potential bugs). |
93d0c67
to
390b95f
Compare
Maybe I'm missing something obvious but I'm not quite sure how PEP 685 is related. Would you mind explaining it a bit more? The way I've designed the PR, it shouldn't depend on anything. It just allows users to specify |
Opened #4734 with just the |
The problem is that the metadata version of the core metadata is incremental:
So we cannot implement PEP 639 before 685, otherwise metadata validation may fail. Even if the PR is independent we cannot merge it now because of the nature of the releases of setuptools (we cannot risk PEP 639 support being released before PEP 685 support). |
The validation will only happen once we update the metadata version. If not, a lot of wheel uploads would probably fail as we currently include What I'm proposing here is simply to add the basic support to setuptools. It won't get validated by PyPI until we're ready to move to |
For sure the existence of the By accepting only some aspects of PEP 639, we add other kinds of spec violations that some tools may not be prepared to deal with. So for the sake of reducing the unknown risks, I propose we pipeline the changes you kindly contributed after the implementation of 685. Unfortunately, it means that people cannot start modifying their |
Sorry, I have been using the wrong PEP number, sorry for the confusion. PEP 685 is important, but the really big one for us to implement before 639 is PEP 643 (the one with |
I understand your reasoning. One last suggestion. The last days I've been looking into how My suggestion
What do you think? |
390b95f
to
97e8f94
Compare
@abravalheri With the last updates, I removed the |
97e8f94
to
f3a1fdd
Compare
if "file" in val: | ||
if isinstance(val, str): | ||
_set_config(dist, "license_expression", _static.Str(val)) | ||
elif "file" in val: |
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.
@cdce8p I updated this part of the code to solve the merge conflict. I hope that is OK.
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.
Thanks. Feel free to ping me, especially if one of my PRs need attention. I'm usually fairly quick to respond.
Small side note. If I review PRs from other people, I only update them with merge commits. The rebase one makes it unnecessarily difficult for the OP to follow and understand what's changed on their own PR. I myself only do force pushes if my PR hasn't been reviewed yet, afterwards only merge commits.
If that's ok with you, I'll force push the rebase once #4796 is done. Just so I'm aware what has changed.
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.
If that's ok with you, I'll force push the rebase once #4796 is done. Just so I'm aware what has changed.
Thanks @cdce8p. That would be helpful.
I usually try to avoid merging the full main branch back to a PR, because it messes up the graph visualisation (which becomes difficult to follow), that is why I went with a rebase, sorry if that disrupted your workflow.
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 usually try to avoid merging the full main branch back to a PR, because it messes up the graph visualisation (which becomes difficult to follow), that is why I went with a rebase, sorry if that disrupted your workflow.
Don't worry about it. Guess everyone has their own preferred workflow. Just wrote that as it took me a bit to actually see what you've changed during the rebase.
Thanks @cdce8p. That would be helpful.
👍🏻
f3a1fdd
to
e42c5c4
Compare
Summary of changes
validate_pyproject
to0.23
https://github.com/abravalheri/validate-pyproject/blob/v0.23/CHANGELOG.rst
https://github.com/abravalheri/validate-pyproject/releases/tag/v0.23
If present, the normalized license expression is written to the
License
field until metadata version2.4
is supported.Refs: #4629