Skip to content

Commit

Permalink
Revert "Merge pull request #2870 from webknjaz/maintenance/fail-loudl…
Browse files Browse the repository at this point in the history
…y-on-invalid-summary"

This reverts commit 77678ab, reversing
changes made to f2de347.

Fixes #2893.
  • Loading branch information
jaraco committed Nov 29, 2021
1 parent ac88873 commit 68795af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog.d/2893.change.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Restore deprecated support for newlines in the Summary field.
8 changes: 4 additions & 4 deletions setuptools/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ def read_pkg_file(self, file):


def single_line(val):
"""Validate that the value does not have line breaks."""
# Ref: https://github.com/pypa/setuptools/issues/1390
# quick and dirty validation for description pypa/setuptools#1390
if '\n' in val:
raise ValueError('Newlines are not allowed')

# TODO after 2021-07-31: Replace with `raise ValueError("newlines not allowed")`
warnings.warn("newlines not allowed and will break in the future")
val = val.replace('\n', ' ')
return val


Expand Down

0 comments on commit 68795af

Please sign in to comment.