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

Introduction of erroneous newlines in Requires-Dist #9

Closed
pelson opened this issue Apr 17, 2024 · 2 comments · Fixed by #10
Closed

Introduction of erroneous newlines in Requires-Dist #9

pelson opened this issue Apr 17, 2024 · 2 comments · Fixed by #10

Comments

@pelson
Copy link
Contributor

pelson commented Apr 17, 2024

Thanks for this project! Was suggested to me in pypa/setuptools#4220 (reply in thread). I noticed that adding a Requires-External modified other parts of the metadata in an incorrect way...

With the normal setuptools backend, I have a record such as the following in METADATA:

Requires-Dist: typing-extensions <5,>=4.2 ; (python_version < "3.8") and extra == 'all'

Meanwhile, with the setuptools-ext backend enabled, you get:

Requires-Dist: typing-extensions <5,>=4.2 ;
 (python_version < "3.8") and extra == 'all'

This is not a valid specification, and results in a unusable wheel. It looks like this comes from email, where https://docs.python.org/3/library/email.generator.html#email.generator.BytesGenerator has a maxlinelength parameter. The value comes from the policy (that is not specified) that you get when you call email.message_from_string - the limit is 78 chars https://docs.python.org/3/library/email.policy.html#email.policy.Policy.max_line_length.

wimglenn added a commit that referenced this issue Apr 17, 2024
Ensure long metadata lines aren't wrapped. Closes #9
@wimglenn
Copy link
Owner

@pelson Thanks for the report. Fixed in 0.6.

@pelson
Copy link
Contributor Author

pelson commented Apr 18, 2024

Nice. Tested and it works great! Thanks for the project! 👍

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 a pull request may close this issue.

2 participants