]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
build: Add python 3.10 to CI. Remove 3.6 3097/head
authorBen Darnell <ben@bendarnell.com>
Mon, 17 Jan 2022 01:37:54 +0000 (20:37 -0500)
committerBen Darnell <ben@bendarnell.com>
Mon, 17 Jan 2022 03:58:46 +0000 (22:58 -0500)
.github/workflows/test.yml
docs/index.rst
pyproject.toml
setup.cfg
setup.py
tornado/test/process_test.py
tornado/testing.py
tox.ini

index 8cbd8629d7261bc889cce04a12a1529aad35a785..f41494303f70484e985a53f6924803fa58868b5e 100644 (file)
@@ -42,6 +42,8 @@ jobs:
             tox_env: py38-full
           - python: '3.9'
             tox_env: py39-full
+          - python: '3.10'
+            tox_env: py310-full
           - python: 'pypy-3.8'
             # Pypy is a lot slower due to jit warmup costs, so don't run the
             # "full" test config there.
index 6f59bd708585d2c3285040bf501ba6f8fc9b4916..7877be8c3b08553c37cfa816287d85abf4cbdb5a 100644 (file)
@@ -96,7 +96,7 @@ installed in this way, so you may wish to download a copy of the
 source tarball or clone the `git repository
 <https://github.com/tornadoweb/tornado>`_ as well.
 
-**Prerequisites**: Tornado 6.0 requires Python 3.6 or newer (See
+**Prerequisites**: Tornado 6.0 requires Python 3.7 or newer (See
 `Tornado 5.1 <https://www.tornadoweb.org/en/branch5.1/>`_ if
 compatibility with Python 2.7 is required). The following optional
 packages may be useful:
index 73200f4f443ead41dc0c445ab3ae1333b229af28..29e9dab68a3826d3171d4d478c2ea64909e0150c 100644 (file)
@@ -1,5 +1,5 @@
 [tool.cibuildwheel]
-build = "cp3[789]*"
+build = "cp3[789]* cp310*"
 test-command = "python -m tornado.test"
 
 [tool.cibuildwheel.macos]
index a365d2c33ccc6976b4fe2bdcf4daace85788df01..e8bf80679ff6b87c308a5e10efdc071b00fb1702 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,7 +2,7 @@
 license_file = LICENSE
 
 [mypy]
-python_version = 3.6
+python_version = 3.7
 no_implicit_optional = True
 
 [mypy-tornado.*,tornado.platform.*]
index 7c9b35c5af0b6d2d6d2ba719c0c1b154a5039d98..3f82314d048b822e0e2304a27ca5cbf7aed79184 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -138,7 +138,7 @@ if (
 
 
 if setuptools is not None:
-    python_requires = ">= 3.6"
+    python_requires = ">= 3.7"
     kwargs["python_requires"] = python_requires
 
 setup(
@@ -180,10 +180,10 @@ setup(
     classifiers=[
         "License :: OSI Approved :: Apache Software License",
         "Programming Language :: Python :: 3",
-        "Programming Language :: Python :: 3.6",
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
         "Programming Language :: Python :: Implementation :: CPython",
         "Programming Language :: Python :: Implementation :: PyPy",
     ],
index 6ff8efde7b72dcfdf3f331b7675ceb8c3840c811..ab290085b3efa351433d277f4b332f465eebbe90 100644 (file)
@@ -76,15 +76,15 @@ class ProcessTest(unittest.TestCase):
                 sock.close()
                 return
             try:
-                if asyncio is not None:
-                    # Reset the global asyncio event loop, which was put into
-                    # a broken state by the fork.
-                    asyncio.set_event_loop(asyncio.new_event_loop())
                 if id in (0, 1):
                     self.assertEqual(id, task_id())
-                    server = HTTPServer(self.get_app())
-                    server.add_sockets([sock])
-                    IOLoop.current().start()
+
+                    async def f():
+                        server = HTTPServer(self.get_app())
+                        server.add_sockets([sock])
+                        await asyncio.Event().wait()
+
+                    asyncio.run(f())
                 elif id == 2:
                     self.assertEqual(id, task_id())
                     sock.close()
index 45e72c8b31fc1d0ce1a0b1bae8fedf2a53619dfb..088530cb763aa3bed3754268371c2eb0ca5debfb 100644 (file)
@@ -248,7 +248,7 @@ class AsyncTestCase(unittest.TestCase):
             tasks = asyncio.Task.all_tasks(asyncio_loop)
         # Tasks that are done may still appear here and may contain
         # non-cancellation exceptions, so filter them out.
-        tasks = [t for t in tasks if not t.done()]
+        tasks = [t for t in tasks if not t.done()]  # type: ignore
         for t in tasks:
             t.cancel()
         # Allow the tasks to run and finalize themselves (which means
diff --git a/tox.ini b/tox.ini
index 6c267598d32bb54d74966cdd6006856f72f59936..56e01a810edad309e3d3372c6000f45d12e9e92e 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -13,7 +13,7 @@
 [tox]
 envlist =
         # Basic configurations: Run the tests for each python version.
-        py36-full,py37-full,py38-full,py39-full,pypy3-full
+        py37-full,py38-full,py39-full,py310-full,pypy3-full
 
         # Build and test the docs with sphinx.
         docs
@@ -27,10 +27,10 @@ whitelist_externals = /bin/sh
 [testenv]
 basepython =
            py3: python3
-           py36: python3.6
            py37: python3.7
            py38: python3.8
            py39: python3.9
+           py310: python3.10
            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
@@ -49,7 +49,7 @@ deps =
 
 setenv =
        # Treat the extension as mandatory in testing (but not on pypy)
-       {py3,py36,py37,py38,py39}: TORNADO_EXTENSION=1
+       {py3,py37,py38,py39,py310}: TORNADO_EXTENSION=1
        # CI workers are often overloaded and can cause our tests to exceed
        # the default timeout of 5s.
        ASYNC_TEST_TIMEOUT=25
@@ -61,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,py36,py37,py38,py39,pypy3}: PYTHONWARNINGS=error:::tornado
+       {py3,py37,py38,py39,py310,pypy3}: PYTHONWARNINGS=error:::tornado
 
 
 # All non-comment lines but the last must end in a backslash.