Ensure _apply_pyproject sets field on dist.metadata object not on dist#4834
Merged
abravalheri merged 1 commit intopypa:feature/pep639from Feb 18, 2025
Merged
Conversation
Contributor
Author
|
/cc @cdce8p |
cdce8p
approved these changes
Feb 18, 2025
Member
cdce8p
left a comment
There was a problem hiding this comment.
(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.
Lines 288 to 292 in 0a4eb8b
Contributor
Author
|
Thank you I will add it just in case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Not sure why the tests where not failing, but I think this is the way we ensure
dist.metadata.license_expressiongets set instead ofdist.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
newsfragments/.(See documentation for details)