diff options
Diffstat (limited to 'setuptools/dist.py')
-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 |