]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
ci: Add python 3.14a1 to test matrix
authorBen Darnell <ben@bendarnell.com>
Fri, 18 Oct 2024 19:35:39 +0000 (15:35 -0400)
committerBen Darnell <ben@bendarnell.com>
Fri, 18 Oct 2024 19:59:46 +0000 (15:59 -0400)
.github/workflows/test.yml
tornado/test/twisted_test.py
tox.ini

index 2b46f54a7d6b48d15a359129b72459d4f129c218..e947689c364f8203a26f682aa64f8afcbabe1b77 100644 (file)
@@ -49,10 +49,12 @@ jobs:
             tox_env: py311-full
           - python: '3.11.0'
             tox_env: py311-full
-          - python: '3.12.0'
+          - python: '3.12'
             tox_env: py312-full
-          - python: '3.13.0-beta.2 - 3.13'
+          - python: '3.13'
             tox_env: py313-full
+          - python: '3.14.0-alpha.1 - 3.14'
+            tox_env: py314-full
           - python: 'pypy-3.10'
             # Pypy is a lot slower due to jit warmup costs, so don't run the
             # "full" test config there.
index 36a541a7a84392ac8380f24842b5e7bee2fcb974..b1bebe6921c002eddd9bfd2600ce079b81f9e95b 100644 (file)
@@ -13,6 +13,7 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+import sys
 import unittest
 
 from tornado.testing import AsyncTestCase, gen_test
@@ -23,6 +24,14 @@ try:
     have_twisted = True
 except ImportError:
     have_twisted = False
+except Exception:
+    # Twisted is currently incompatible with the first 3.14 alpha release; disable this
+    # test until the beta when it will hopefully be fixed (note that this requires us to
+    # update our requirements.txt to pick up a new version of twisted).
+    if sys.version_info[:2] == (3, 14) and sys.version_info.releaselevel == "alpha":
+        have_twisted = False
+    else:
+        raise
 else:
     # Not used directly but needed for `yield deferred` to work.
     import tornado.platform.twisted  # noqa: F401
diff --git a/tox.ini b/tox.ini
index 66d07cba2e4222c422c34c063edbe9aa7b46bbc8..07ca0c5e3dce8d056f5d370cd26090f266d23d6b 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -29,6 +29,7 @@ basepython =
            py311: python3.11
            py312: python3.12
            py313: python3.13
+           py314: python3.14
            pypy3: pypy3
            # In theory, it doesn't matter which python version is used here.
            # In practice, things like changes to the ast module can alter
@@ -48,7 +49,7 @@ deps =
 
 setenv =
        # Treat the extension as mandatory in testing (but not on pypy)
-       {py3,py39,py310,py311,py312,py313}: TORNADO_EXTENSION=1
+       {py3,py39,py310,py311,py312,py313,py314}: TORNADO_EXTENSION=1
        # CI workers are often overloaded and can cause our tests to exceed
        # the default timeout of 5s.
        ASYNC_TEST_TIMEOUT=25
@@ -60,7 +61,7 @@ setenv =
        # during sdist installation (and it doesn't seem to be
        # possible to set environment variables during that phase of
        # tox).
-       {py3,py39,py310,py311,py312,py313,pypy3}: PYTHONWARNINGS=error:::tornado
+       {py3,py39,py310,py311,py312,py313,py314,pypy3}: PYTHONWARNINGS=error:::tornado
        # Warn if we try to open a file with an unspecified encoding.
        # (New in python 3.10, becomes obsolete when utf8 becomes the
        # default in 3.15)