From e9d2e8f89729837c4c8bc6af7f3c583ccc737406 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 5 Sep 2024 09:44:32 -0400 Subject: [PATCH] remove setuptools test, backport issue #11818 to support our release tools we need to fully move 1.4 into modern setuptools territory in order to continue releasing. Fixes: #11818 Change-Id: Idb512a4990b002062f0c02ad22ee488c97c18ef4 --- doc/build/changelog/unreleased_14/11818.rst | 18 ++++++++++++++++++ .../unreleased_14/remove_testcommand.rst | 7 +++++++ pyproject.toml | 4 +--- setup.py | 19 ------------------- 4 files changed, 26 insertions(+), 22 deletions(-) create mode 100644 doc/build/changelog/unreleased_14/11818.rst create mode 100644 doc/build/changelog/unreleased_14/remove_testcommand.rst diff --git a/doc/build/changelog/unreleased_14/11818.rst b/doc/build/changelog/unreleased_14/11818.rst new file mode 100644 index 0000000000..c71d299ff1 --- /dev/null +++ b/doc/build/changelog/unreleased_14/11818.rst @@ -0,0 +1,18 @@ +.. change:: + :tags: change, general + :tickets: 11818 + :versions: 2.0.33 1.4.54 + + The pin for ``setuptools<69.3`` in ``pyproject.toml`` has been removed. + This pin was to prevent a sudden change in setuptools to use :pep:`625` + from taking place, which would change the file name of SQLAlchemy's source + distribution on pypi to be an all lower case name, which is likely to cause + problems with various build environments that expected the previous naming + style. However, the presence of this pin is holding back environments that + otherwise want to use a newer setuptools, so we've decided to move forward + with this change, with the assumption that build environments will have + largely accommodated the setuptools change by now. + + This change was first released in version 2.0.33 however is being + backported to 1.4.54 to support ongoing releases. + diff --git a/doc/build/changelog/unreleased_14/remove_testcommand.rst b/doc/build/changelog/unreleased_14/remove_testcommand.rst new file mode 100644 index 0000000000..61c89d912c --- /dev/null +++ b/doc/build/changelog/unreleased_14/remove_testcommand.rst @@ -0,0 +1,7 @@ +.. change:: + :tags: change, general + + The setuptools "test" command is removed from the 1.4 series as modern + versions of setuptools actively refuse to accommodate this extension being + present. This change was already part of the 2.0 series. To run the + test suite use the ``tox`` command. diff --git a/pyproject.toml b/pyproject.toml index 891120ab7e..6a93e95733 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,7 @@ [build-system] build-backend = "setuptools.build_meta" requires = [ - # avoid moving to https://github.com/pypa/setuptools/issues/3593 - # until we're ready - "setuptools>=44,<69.3", + "setuptools>=44", ] [tool.black] diff --git a/setup.py b/setup.py index f1a1cacba3..243c969670 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,6 @@ from setuptools import Distribution as _Distribution from setuptools import Extension from setuptools import setup from setuptools.command.build_ext import build_ext -from setuptools.command.test import test as TestCommand # attempt to use pep-632 imports for setuptools symbols; however, # since these symbols were only added to setuptools as of 59.0.1, @@ -95,24 +94,6 @@ class Distribution(_Distribution): return True -class UseTox(TestCommand): - RED = 31 - RESET_SEQ = "\033[0m" - BOLD_SEQ = "\033[1m" - COLOR_SEQ = "\033[1;%dm" - - def run_tests(self): - sys.stderr.write( - "%s%spython setup.py test is deprecated by pypa. Please invoke " - "'tox' with no arguments for a basic test run.\n%s" - % (self.COLOR_SEQ % self.RED, self.BOLD_SEQ, self.RESET_SEQ) - ) - sys.exit(1) - - -cmdclass["test"] = UseTox - - def status_msgs(*msgs): print("*" * 75) for msg in msgs: -- 2.47.2