env:
global:
- - CIBW_BUILD="cp3[56789]*"
+ - CIBW_BUILD="cp3[6789]*"
- CIBW_TEST_COMMAND="python3 -m tornado.test"
- CIBW_TEST_COMMAND_WINDOWS="python -m tornado.test --fail-if-logs=false"
arch: amd64
env: BUILD_SDIST=1
- # 3.5.2 is interesting because it's the version in ubuntu 16.04, and due to python's
- # "provisional feature" rules there are significant differences between patch
- # versions for asyncio and typing.
- - python: 3.5.2
- # Twisted doesn't install on python 3.5.2, so don't run the "full" tests.
- env: TOX_ENV=py35
- stage: test
- - python: '3.5'
- env: TOX_ENV=py35-full
- python: '3.6'
env: TOX_ENV=py36-full
- python: '3.7'
2. Install Python prerequisites
- This demo requires Python 3.5 or newer, and the packages listed in
+ This demo requires Python 3.6 or newer, and the packages listed in
requirements.txt. Install them with `pip -r requirements.txt`
3. Create a database and user for the blog.
source tarball or clone the `git repository
<https://github.com/tornadoweb/tornado>`_ as well.
-**Prerequisites**: Tornado 6.0 requires Python 3.5.2 or newer (See
+**Prerequisites**: Tornado 6.0 requires Python 3.6 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:
[tox]
# This currently segfaults on pypy.
-envlist = py27,py35,py36
+envlist = py27,py36
[testenv]
deps =
# defaults for the others.
basepython =
py27: python2.7
- py35: python3.5
py36: python3.6
{
- "options": {"failByDrop": false},
- "outdir": "./reports/servers",
-
- "servers": [
- {"agent": "Tornado/py27", "url": "ws://localhost:9001",
- "options": {"version": 18}},
- {"agent": "Tornado/py35", "url": "ws://localhost:9002",
- "options": {"version": 18}},
- {"agent": "Tornado/pypy", "url": "ws://localhost:9003",
- "options": {"version": 18}}
- ],
-
- "cases": ["*"],
- "exclude-cases": ["9.*", "12.*.1","12.2.*", "12.3.*", "12.4.*", "12.5.*", "13.*.1"],
- "exclude-agent-cases": {}
-}
+ "options": {
+ "failByDrop": false
+ },
+ "outdir": "./reports/servers",
+ "servers": [
+ {
+ "agent": "Tornado/py27",
+ "url": "ws://localhost:9001",
+ "options": {
+ "version": 18
+ }
+ },
+ {
+ "agent": "Tornado/py39",
+ "url": "ws://localhost:9002",
+ "options": {
+ "version": 18
+ }
+ },
+ {
+ "agent": "Tornado/pypy",
+ "url": "ws://localhost:9003",
+ "options": {
+ "version": 18
+ }
+ }
+ ],
+ "cases": [
+ "*"
+ ],
+ "exclude-cases": [
+ "9.*",
+ "12.*.1",
+ "12.2.*",
+ "12.3.*",
+ "12.4.*",
+ "12.5.*",
+ "13.*.1"
+ ],
+ "exclude-agent-cases": {}
+}
\ No newline at end of file
sleep 1
.tox/py27/bin/python client.py --name='Tornado/py27'
-.tox/py35/bin/python client.py --name='Tornado/py35'
+.tox/py39/bin/python client.py --name='Tornado/py39'
.tox/pypy/bin/python client.py --name='Tornado/pypy'
kill $FUZZING_SERVER_PID
.tox/py27/bin/python server.py --port=9001 &
PY27_SERVER_PID=$!
-.tox/py35/bin/python server.py --port=9002 &
-PY35_SERVER_PID=$!
+.tox/py39/bin/python server.py --port=9002 &
+PY39_SERVER_PID=$!
.tox/pypy/bin/python server.py --port=9003 &
PYPY_SERVER_PID=$!
.tox/py27/bin/wstest -m fuzzingclient
kill $PY27_SERVER_PID
-kill $PY35_SERVER_PID
+kill $PY39_SERVER_PID
kill $PYPY_SERVER_PID
wait
# to install autobahn and build the speedups module.
# See run.sh for the real test runner.
[tox]
-envlist = py27, py35, pypy
+envlist = py27, py39, pypy
setupdir=../../..
[testenv]
license_file = LICENSE
[mypy]
-python_version = 3.5
+python_version = 3.6
no_implicit_optional = True
[mypy-tornado.*,tornado.platform.*]
if setuptools is not None:
- python_requires = ">= 3.5"
+ python_requires = ">= 3.6"
kwargs["python_requires"] = python_requires
setup(
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
num = float(m.group(1))
units = m.group(2) or "seconds"
units = self._TIMEDELTA_ABBREV_DICT.get(units, units)
- sum += datetime.timedelta(**{units: num})
+ # This line confuses mypy when setup.py sets python_version=3.6
+ # https://github.com/python/mypy/issues/9676
+ sum += datetime.timedelta(**{units: num}) # type: ignore
start = m.end()
return sum
except Exception:
from tornado.web import Application
import typing
-from typing import Tuple, Any, Callable, Type, Dict, Union, Optional
+from typing import Tuple, Any, Callable, Type, Dict, Union, Optional, Coroutine
from types import TracebackType
if typing.TYPE_CHECKING:
- # Coroutine wasn't added to typing until 3.5.3, so only import it
- # when mypy is running and use forward references.
- from typing import Coroutine # noqa: F401
-
_ExcInfoTuple = Tuple[
Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]
]
class ObjectDict(Dict[str, Any]):
- """Makes a dictionary behave like an object, with attribute-style access.
- """
+ """Makes a dictionary behave like an object, with attribute-style access."""
def __getattr__(self, name: str) -> Any:
try:
@property
def unconsumed_tail(self) -> bytes:
- """Returns the unconsumed portion left over
- """
+ """Returns the unconsumed portion left over"""
return self.decompressobj.unconsumed_tail
def flush(self) -> bytes:
def raise_exc_info(
- exc_info, # type: Tuple[Optional[type], Optional[BaseException], Optional[TracebackType]]
-):
- # type: (...) -> typing.NoReturn
- #
- # This function's type annotation must use comments instead of
- # real annotations because typing.NoReturn does not exist in
- # python 3.5's typing module. The formatting is funky because this
- # is apparently what flake8 wants.
+ exc_info: Tuple[Optional[type], Optional[BaseException], Optional["TracebackType"]]
+) -> typing.NoReturn:
try:
if exc_info[1] is not None:
raise exc_info[1].with_traceback(exc_info[2])
[tox]
envlist =
# Basic configurations: Run the tests for each python version.
- py35-full,py36-full,py37-full,py38-full,py39-full,pypy3-full
+ py36-full,py37-full,py38-full,py39-full,pypy3-full
# Build and test the docs with sphinx.
docs
[testenv]
basepython =
py3: python3
- py35: python3.5
py36: python3.6
py37: python3.7
py38: python3.8
# during sdist installation (and it doesn't seem to be
# possible to set environment variables during that phase of
# tox).
- # ResourceWarnings are too noisy on py35 so don't enable
- # warnings-as-errors there.
{py3,py36,py37,py38,py39,pypy3}: PYTHONWARNINGS=error:::tornado