Skip to content

Require that package descriptions not include newlines#219

Merged
neersighted merged 2 commits into
python-poetry:masterfrom
tipabu:single-line-description
Nov 10, 2021
Merged

Require that package descriptions not include newlines#219
neersighted merged 2 commits into
python-poetry:masterfrom
tipabu:single-line-description

Conversation

@tipabu
Copy link
Copy Markdown
Contributor

@tipabu tipabu commented Oct 9, 2021

Previously, we would include the description-with-newlines directly as the PKG-INFO summary, which could cause subtly broken builds (for instance, the package may install, but none of the specified dependencies).

Now, raise a validation error during building, like:

RuntimeError

The Poetry configuration is invalid:
  - [description] 'First line\nSecond line (BOOOOOM)' does not match '^[^\n]+$'

Resolves: python-poetry/poetry#1372

  • Added tests for changed code.
  • Updated documentation for changed code.

tipabu added 2 commits October 8, 2021 16:52
Previously, we would include the description-with-newlines directly as
the PKG-INFO summary, which could cause subtly broken builds (for
instance, the package may install, but none of the specified
dependencies).

Now, raise a validation error during building, like:

  RuntimeError

  The Poetry configuration is invalid:
    - [description] 'First line\nSecond line (BOOOOOM)' does not match '^[^\n]+$'

Closes python-poetry/poetry#1372
@finswimmer finswimmer requested a review from a team November 8, 2021 20:18
Copy link
Copy Markdown
Member

@neersighted neersighted left a comment

Choose a reason for hiding this comment

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

Looks pretty straightforward and solves the bug nicely. I have to admit the error message is not the best, but I'm in favor of merging this and cleaning up the error later if it's non-obvious to people, since the issue is longstanding.

@neersighted neersighted merged commit 5994fa8 into python-poetry:master Nov 10, 2021
@tipabu tipabu deleted the single-line-description branch November 13, 2021 05:21
@finswimmer finswimmer mentioned this pull request Feb 9, 2022
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.

Poetry allows multiline descriptions which causes problems with pip installing extras

2 participants