]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
working out nox edge cases workflow_test_mwnox
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 3 Oct 2025 19:12:12 +0000 (15:12 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 3 Oct 2025 22:09:15 +0000 (18:09 -0400)
Change-Id: Ibba2450cb0bc18de77fcee9e58fda083ce8a7332

.github/workflows/run-on-pr.yaml
.github/workflows/run-test.yaml
noxfile.py
pyproject.toml
tools/toxnox.py

index 098d0e5dae8bad4961d3c08e13cf6cd2844da103..f4140cef166167ce61ef3a97dfe412acaedf5fba 100644 (file)
@@ -25,7 +25,7 @@ jobs:
         os:
           - "ubuntu-22.04"
         python-version:
-          - "3.12"
+          - "3.13"
         sqlalchemy:
           - sqla14
           - sqla20
index 33708edfe7c14e24e97d945b5acb6b43e00fb5fa..c8a78a8dab5e929168e1e5dbfbf47dd47e935175 100644 (file)
@@ -30,7 +30,6 @@ jobs:
           - "windows-latest"
           - "macos-latest"
         python-version:
-          - "3.9"
           - "3.10"
           - "3.11"
           - "3.12"
@@ -43,9 +42,6 @@ jobs:
           # sqla14 does not support 3.13+
           - sqlalchemy: sqla14
             python-version: "3.13"
-          # sqlamain does not support 3.9
-          - sqlalchemy: main
-            python-version: "3.9"
 
 
       fail-fast: false
index d1dc2144d44ee5426200869c0f8c293700b11e8b..80980bba51a85f2354f7bb4d9e824dbdd4e85a75 100644 (file)
@@ -215,11 +215,10 @@ def lint(session: nox.Session) -> None:
 
 
 @nox.session(name="pyoptimize")
-@tox_parameters(["python"], [PYTHON_VERSIONS], base_tag="pyoptimize")
 def test_pyoptimize(session: nox.Session) -> None:
     """Run the script consumption suite against .pyo files rather than .pyc"""
 
-    session.install(*nox.project.dependency_groups(pyproject, "test"))
+    session.install(*nox.project.dependency_groups(pyproject, "tests"))
     session.install(".")
 
     session.env["PYTHONOPTIMIZE"] = "1"
index 2ddb1ae66b797ad35cf227dd2ef8ea8dd7939226..1b0d58793870cb909fd53f3c1cab7b631041f95c 100644 (file)
@@ -55,7 +55,8 @@ alembic = "alembic.config:main"
 tests = [
     "pytest>8,<8.4",
     "pytest-xdist",
-    "black==25.1.0"  # for test_post_write.py
+    "black==25.1.0",  # for test_post_write.py
+    "tzdata"
 ]
 
 coverage = [
index 09ba52606c14c643d4fb08b3fa302cb9a9d3c118..497a689c613fb3a70c0c73d7776133053439c656 100644 (file)
@@ -71,7 +71,7 @@ def tox_parameters(
 
     """
 
-    PY_RE = re.compile(r"(?:python)?([234]\.\d+t?)")
+    PY_RE = re.compile(r"(?:python)?([234]\.\d+(t?))")
 
     def _is_py_version(token):
         return bool(PY_RE.match(token))
@@ -84,8 +84,15 @@ def tox_parameters(
         name
 
         """
+        if sys.platform == "win32":
+            return token
+
         m = PY_RE.match(token)
-        if m:
+
+        # do this matching minimally so that it only happens for the
+        # free-threaded versions.  on windows, the "pythonx.y" syntax doesn't
+        # work due to the use of the "py" tool
+        if m and m.group(2) == "t":
             return f"python{m.group(1)}"
         else:
             return token
@@ -185,8 +192,7 @@ def tox_parameters(
     ]
 
     # for p in params:
-    #   print(f"PARAM {'-'.join(p.args)} TAGS {p.tags}")
-    # breakpoint()
+    #     print(f"PARAM {'-'.join(p.args)} TAGS {p.tags}")
 
     return nox.parametrize(names, params)