[metadata]
name = setuptools
-version = 59.3.0
+version = 59.4.0
author = Python Packaging Authority
author_email = distutils-sig@python.org
description = Easily download, build, install, upgrade, and uninstall Python packages
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.strip().split('\n')[0]
return val