Skip to content

Conversation

@abravalheri
Copy link
Contributor

@abravalheri abravalheri commented Feb 17, 2025

Summary of changes

Not sure why the tests where not failing, but I think this is the way we ensure dist.metadata.license_expression gets set instead of dist.license_expression.

(I guess the test hasattr(dist.metadata, field) is true? Is it always true? If not when it is false?)

Pull Request Checklist

@abravalheri
Copy link
Contributor Author

/cc @cdce8p

@abravalheri abravalheri marked this pull request as ready for review February 17, 2025 18:36
@abravalheri abravalheri mentioned this pull request Feb 17, 2025
6 tasks
Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I guess the test hasattr(dist.metadata, field) is true? Is it always true? If not when it is false?)

I did add license_expression to _DISTUTILS_UNSUPPORTED_METADATA so it's always initialized to None on dist.metadata anyway.

_DISTUTILS_UNSUPPORTED_METADATA = {
'long_description_content_type': lambda: None,
'project_urls': dict,
'provides_extras': dict, # behaves like an ordered set
'license_expression': lambda: None,

@abravalheri abravalheri merged commit 0d0d516 into pypa:feature/pep639 Feb 18, 2025
21 of 24 checks passed
@abravalheri abravalheri deleted the apply_pyproject branch February 18, 2025 10:45
@abravalheri
Copy link
Contributor Author

Thank you I will add it just in case.

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.

2 participants