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

pip show displays License metadata field - switch to License-Expression? #13112

Open
1 task done
befeleme opened this issue Dec 11, 2024 · 1 comment
Open
1 task done
Labels
C: list/show 'pip list' or 'pip show' type: feature request Request for a new feature

Comments

@befeleme
Copy link

What's the problem this feature will solve?

With PEP 639 accepted, there is a new metadata field to get the license information from: License-Expression.

pip show currently shows the License field contents:

license=metadata.get("License", ""),

Describe the solution you'd like

I think should add the display of License-Expression field and in the long run maybe switch to it entirely. Initially there will be a few packages produced with the new metadata, but in the long run only the License-Expression will remain.
Hence, I'd propose to try to obtain the license information from License-Expression - standardized and validated and fall back to the deprecated unstructured License in case License-Expression isn't found.

Alternative Solutions

What else is possible:

  • do nothing - the deprecated License will be less used in time
  • switch to License-Expression entirely - for majority of existing packages this would mean producing an empty field for months/years to come
  • add License-Expression as a separate field displayed with the package data - this feels redundant, but if that's deemed a better approach, I'm not against.

Additional context

Once agreed upon solution, I can send a patch.

Code of Conduct

@befeleme befeleme added S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature labels Dec 11, 2024
@pfmoore
Copy link
Member

pfmoore commented Dec 11, 2024

I agree, in principle. I would suggest we only show License-Expression if metadata version is 2.4 or greater. So the logic should be:

  1. If metadata version >= 2.4 and License-Expression is present: Display License-Expression.
  2. Otherwise, display License.

@ichard26 ichard26 added C: list/show 'pip list' or 'pip show' and removed S: needs triage Issues/PRs that need to be triaged labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: list/show 'pip list' or 'pip show' type: feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

3 participants