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.
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:
[tool.cibuildwheel]
-build = "cp3[789]*"
+build = "cp3[789]* cp310*"
test-command = "python -m tornado.test"
[tool.cibuildwheel.macos]
license_file = LICENSE
[mypy]
-python_version = 3.6
+python_version = 3.7
no_implicit_optional = True
[mypy-tornado.*,tornado.platform.*]
if setuptools is not None:
- python_requires = ">= 3.6"
+ python_requires = ">= 3.7"
kwargs["python_requires"] = python_requires
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",
],
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()
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
[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
[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
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
# 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.