Skip to content

Bug: License-Expression not found in local packages #121

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

Open
Archieb13 opened this issue May 6, 2025 · 0 comments
Open

Bug: License-Expression not found in local packages #121

Archieb13 opened this issue May 6, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Archieb13
Copy link

Issue Details

LocalPackageInfo doesn't find licenses defined with License-Expression.

Description

I noticed this when checking a package playwright where no license was found. On inspection it would appear that the wrong string is used when searching for License-Expression (License_Expression is used). It should be a hyphen as per PEP-639.

Why did i notice it? It appears playwright has an issue in the json metadata on the latest version and the license cannot be found on remote either (which is the fallback) - https://pypi.org/pypi/playwright/1.52.0/json

	def get_license(self) -> str | None:
		return (
			meta_get(self.meta, "License_Expression")
			or from_classifiers(self.meta.get_all("Classifier"))
			or meta_get(self.meta, "License")
		)

Expected Behavior

License-Expression should be found in metadata

Actual Behavior

No License found (this happens for all PEP-639 packages except it is normally silent due to the remote fallback

System Information

environment:Python 3.10.12

  • Operating System (OS): Ubuntu
  • OS Version: 22.04
@Archieb13 Archieb13 added the bug Something isn't working label May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants