Commit cda74146 authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #2538 from pypa/bugfix/1390-lenient-description

Repair Descriptions with newlines and emit a warning
parents 6b44f948 2f891b43
Validation of Description field now is more lenient, emitting a warning and mangling the value to be valid (replacing newlines with spaces).
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment