From 202a1bf9eca0c3ae1545aec6934f577224787b5c Mon Sep 17 00:00:00 2001 From: JinWang An Date: Mon, 27 Mar 2023 17:02:36 +0900 Subject: [PATCH] Imported Upstream version 58.0.3 --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ setup.cfg | 4 ++-- setuptools/dist.py | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 2eb9496..c95f09e 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.0.2 +current_version = 58.0.3 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index bf4ec6d..a919b31 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v58.0.3 +------- + + +Misc +^^^^ +* #2777: Build does not fail fast when ``use_2to3`` is supplied but set to a false value. + + v58.0.2 ------- diff --git a/setup.cfg b/setup.cfg index 92f8616..fbf82af 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 58.0.2 +version = 58.0.3 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages @@ -124,7 +124,7 @@ distutils.setup_keywords = dependency_links = setuptools.dist:assert_string_list test_loader = setuptools.dist:check_importable test_runner = setuptools.dist:check_importable - use_2to3 = setuptools.dist:invalid + use_2to3 = setuptools.dist:invalid_unless_false egg_info.writers = PKG-INFO = setuptools.command.egg_info:write_pkg_info requires.txt = setuptools.command.egg_info:write_requirements diff --git a/setuptools/dist.py b/setuptools/dist.py index 3363495..8e2111a 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -289,7 +289,10 @@ def assert_bool(dist, attr, value): raise DistutilsSetupError(tmpl.format(attr=attr, value=value)) -def invalid(dist, attr, value): +def invalid_unless_false(dist, attr, value): + if not value: + warnings.warn(f"{attr} is ignored.", DistDeprecationWarning) + return raise DistutilsSetupError(f"{attr} is invalid.") -- 2.34.1