]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
remove setuptools test, backport issue #11818
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 5 Sep 2024 13:44:32 +0000 (09:44 -0400)
committerMichael Bayer <mike_mp@zzzcomputing.com>
Thu, 5 Sep 2024 14:36:02 +0000 (14:36 +0000)
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 [new file with mode: 0644]
doc/build/changelog/unreleased_14/remove_testcommand.rst [new file with mode: 0644]
pyproject.toml
setup.py

diff --git a/doc/build/changelog/unreleased_14/11818.rst b/doc/build/changelog/unreleased_14/11818.rst
new file mode 100644 (file)
index 0000000..c71d299
--- /dev/null
@@ -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 (file)
index 0000000..61c89d9
--- /dev/null
@@ -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.
index 891120ab7e0d296b6e4d8e3292b774f68af2c00c..6a93e9573325f073e9ab826e03c5433afadcfd09 100644 (file)
@@ -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]
index f1a1cacba366f699d5aca2f0aafa83fd77383b9c..243c9696704102ac5d05095d62bd6393f3769ac4 100644 (file)
--- 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: