ci: Add python 3.14a1 to test matrix

This commit is contained in:
Ben Darnell 2024-10-18 15:35:39 -04:00
parent ac0daf7d59
commit e7cb38e6a4
3 changed files with 16 additions and 4 deletions

View File

@ -49,10 +49,12 @@ jobs:
tox_env: py311-full tox_env: py311-full
- python: '3.11.0' - python: '3.11.0'
tox_env: py311-full tox_env: py311-full
- python: '3.12.0' - python: '3.12'
tox_env: py312-full tox_env: py312-full
- python: '3.13.0-beta.2 - 3.13' - python: '3.13'
tox_env: py313-full tox_env: py313-full
- python: '3.14.0-alpha.1 - 3.14'
tox_env: py314-full
- python: 'pypy-3.10' - python: 'pypy-3.10'
# Pypy is a lot slower due to jit warmup costs, so don't run the # Pypy is a lot slower due to jit warmup costs, so don't run the
# "full" test config there. # "full" test config there.

View File

@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import sys
import unittest import unittest
from tornado.testing import AsyncTestCase, gen_test from tornado.testing import AsyncTestCase, gen_test
@ -23,6 +24,14 @@ try:
have_twisted = True have_twisted = True
except ImportError: except ImportError:
have_twisted = False 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: else:
# Not used directly but needed for `yield deferred` to work. # Not used directly but needed for `yield deferred` to work.
import tornado.platform.twisted # noqa: F401 import tornado.platform.twisted # noqa: F401

View File

@ -29,6 +29,7 @@ basepython =
py311: python3.11 py311: python3.11
py312: python3.12 py312: python3.12
py313: python3.13 py313: python3.13
py314: python3.14
pypy3: pypy3 pypy3: pypy3
# In theory, it doesn't matter which python version is used here. # In theory, it doesn't matter which python version is used here.
# In practice, things like changes to the ast module can alter # In practice, things like changes to the ast module can alter
@ -48,7 +49,7 @@ deps =
setenv = setenv =
# Treat the extension as mandatory in testing (but not on pypy) # 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 # CI workers are often overloaded and can cause our tests to exceed
# the default timeout of 5s. # the default timeout of 5s.
ASYNC_TEST_TIMEOUT=25 ASYNC_TEST_TIMEOUT=25
@ -60,7 +61,7 @@ setenv =
# during sdist installation (and it doesn't seem to be # during sdist installation (and it doesn't seem to be
# possible to set environment variables during that phase of # possible to set environment variables during that phase of
# tox). # 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. # Warn if we try to open a file with an unspecified encoding.
# (New in python 3.10, becomes obsolete when utf8 becomes the # (New in python 3.10, becomes obsolete when utf8 becomes the
# default in 3.15) # default in 3.15)