summaryrefslogtreecommitdiff
path: root/setuptools/dist.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-01-17 12:14:25 -0500
committerJason R. Coombs <jaraco@jaraco.com>2021-01-17 12:14:25 -0500
commit2f891b433c42eb1554644199058c9190790ebf85 (patch)
treeaffdb63bda1f7b75e814eddc8fc586cd00309912 /setuptools/dist.py
parent6b44f948ca40ee490c59d216a0e859d17431742a (diff)
downloadpython-setuptools-git-bugfix/1390-lenient-description.tar.gz
Repair Descriptions with newlines and emit a warning that the value will be disallowed in the future.bugfix/1390-lenient-description
Diffstat (limited to 'setuptools/dist.py')
-rw-r--r--setuptools/dist.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py
index 2d0aac33..172d66b1 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -121,7 +121,9 @@ def read_pkg_file(self, file):
def single_line(val):
# quick and dirty validation for description pypa/setuptools#1390
if '\n' in val:
- raise ValueError("newlines not allowed")
+ # TODO after 2021-07-31: Replace with `raise ValueError("newlines not allowed")`
+ warnings.UserWarning("newlines not allowed and will break in the future")
+ val = val.replace('\n', ' ')
return val