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

Require that package descriptions not include newlines #219

Merged
merged 2 commits into from
Nov 10, 2021

Conversation

tipabu
Copy link
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.

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
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