From f6c6fafd684678a43e3a8737649f8560dcc7c6a0 Mon Sep 17 00:00:00 2001 From: JinWang An Date: Mon, 27 Mar 2023 17:02:31 +0900 Subject: [PATCH] Imported Upstream version 51.3.2 --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ setup.cfg | 2 +- setuptools/dist.py | 4 +++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 2cb5029..4d60721 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 51.3.1 +current_version = 51.3.2 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 2be5fa2..2de874c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v51.3.2 +------- + + +Misc +^^^^ +* #1390: Validation of Description field now is more lenient, emitting a warning and mangling the value to be valid (replacing newlines with spaces). + + v51.3.1 ------- diff --git a/setup.cfg b/setup.cfg index aead434..2476ede 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ license_files = LICENSE name = setuptools -version = 51.3.1 +version = 51.3.2 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages diff --git a/setuptools/dist.py b/setuptools/dist.py index 2d0aac3..172d66b 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 -- 2.34.1