diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2021-11-12 19:03:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-12 19:03:46 -0500 |
| commit | 77678abf97b4a8ee5e6e67b14cb21f543cd6bfd9 (patch) | |
| tree | 3ed3239ce5c2171e2d92b7ed3dfca4d276072ca2 /setuptools | |
| parent | f2de34767a7ba6dc79b73e474b3e2ffdbfd6e75b (diff) | |
| parent | 25d1d5458716f9f80b2c5094461579cfa0fe4469 (diff) | |
| download | python-setuptools-git-77678abf97b4a8ee5e6e67b14cb21f543cd6bfd9.tar.gz | |
Merge pull request #2870 from webknjaz/maintenance/fail-loudly-on-invalid-summary
Fail on a multiline distribution package summary
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/dist.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py index 8e2111a5..848d6b0f 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -145,11 +145,11 @@ def read_pkg_file(self, file): def single_line(val): - # quick and dirty validation for description pypa/setuptools#1390 + """Validate that the value does not have line breaks.""" + # Ref: https://github.com/pypa/setuptools/issues/1390 if '\n' in val: - # 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', ' ') + raise ValueError('Newlines are not allowed') + return val |
