Skip to content

Chage in serialization output with trailing newline in License field #202

@dnicolodi

Description

@dnicolodi

In a project using

[project]
license = { file = 'LICENSE' }

with the content of LICENSE being

some license

including the trailing newline, with pyproject-metadata 0.8 I obtain a RFC822 serialization of the metadata that looks like:

License: some license\n

with pyproject-metadata 0.9.0b7 I obtain:

License: some license\n
         \n

where I made the newlines explicit in the RFC822 serialization. When the metadata is read back by packaging.metadata.parse_email() the latter results in a license field having content some license\n . We can argue that whitespace at the end of the text field is not significant, but maybe we should keep stripping the trailing newline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions