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

Ignore newlines when processing keywords/platforms #4888

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

frenzymadness
Copy link
Contributor

Summary of changes

Newlines in keywords or platforms can break
the produced metadata in PKG-INFO or METADATA files.

Fixes: #4887

Pull Request Checklist

  • Changes have tests
  • News fragment added in [newsfragments/].

Newlines in `keywords` or `platforms` can break
the produced metadata in PKG-INFO or METADATA files.

Fixes: pypa#4887
@abravalheri
Copy link
Contributor

Thank you very much @frenzymadness for having a look on this issue and proposing a solution.

I think we have 2 options according to https://setuptools.pypa.io/en/latest/development/developer-guide.html#code-conventions-and-other-practices (see description about modifying files in the _distutils folder):

  1. Contribute this change to the pypa/distutils repository (requires changing the test cases to another file that exists in the pypa/distutils repository).
  2. Attempt to implement a different change outside of the _distutils folder.

In the case we go for a change in the pypa/setuptools repository, I believe that the best here is to comply with the documented behaviour and raise an error when \n is used (maintainers of pypa/distutils might have a different opinion).

@frenzymadness
Copy link
Contributor Author

You are right, sorry. Let me take this to distutils and see what they think about this change there.

@frenzymadness frenzymadness marked this pull request as draft March 19, 2025 09:43
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.

[BUG] multiline keywords breaks metadata file
2 participants