]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Drop support for python 3.5 2945/head
authorBen Darnell <ben@bendarnell.com>
Fri, 30 Oct 2020 17:57:36 +0000 (13:57 -0400)
committerBen Darnell <ben@bendarnell.com>
Sat, 31 Oct 2020 12:38:17 +0000 (08:38 -0400)
14 files changed:
.travis.yml
demos/blog/README
docs/index.rst
maint/test/cython/tox.ini
maint/test/websocket/fuzzingclient.json
maint/test/websocket/run-client.sh
maint/test/websocket/run-server.sh
maint/test/websocket/tox.ini
setup.cfg
setup.py
tornado/options.py
tornado/testing.py
tornado/util.py
tox.ini

index 83943b296f06c6afaa791e70998ad4f8c0eacc20..f7b1e825ef5a567cfb0d9a412eae47630dbc26d3 100644 (file)
@@ -10,7 +10,7 @@ addons:
 
 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"
 
@@ -63,15 +63,6 @@ jobs:
       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'
index d674c876e46185c9dbd4701c4faea79f70ea5276..f54ad0abc8e130959f3998a3cf21029b078aaa76 100644 (file)
@@ -15,7 +15,7 @@ its prerequisites can be installed with `docker-compose up`.
 
 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.
index 8a663c307c66d4f7ed474f5fd8c6efb37b8d2162..6f59bd708585d2c3285040bf501ba6f8fc9b4916 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.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:
index bbf8f15748da2bf24e3115f69b21eb9eb62fa311..c79ab7db5ec71b7d7b767aa6ffe379366282ed6c 100644 (file)
@@ -1,6 +1,6 @@
 [tox]
 # This currently segfaults on pypy.
-envlist = py27,py35,py36
+envlist = py27,py36
 
 [testenv]
 deps =
@@ -13,5 +13,4 @@ commands = python -m unittest cythonapp_test
 # defaults for the others.
 basepython =
            py27: python2.7
-           py35: python3.5
            py36: python3.6
index 7b4cb318cf0a21afbbc948861e8992db7c4209fc..2ac091f37ae9acee5f1651d2b20ce6026990b2ec 100644 (file)
@@ -1,17 +1,42 @@
 {
-   "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
index bd35f4dca8e96dbb85512f87736f1c33fd0d9a82..f32e72aff965b54cc79b6fc55320eaaa98839481 100755 (executable)
@@ -10,7 +10,7 @@ FUZZING_SERVER_PID=$!
 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
index 2a838713668a4396c110583e8503b63d21df9002..401795a0056a1bf3a49bd6f1d79ed5f53581df24 100755 (executable)
@@ -15,8 +15,8 @@ tox
 .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=$!
@@ -26,7 +26,7 @@ sleep 1
 .tox/py27/bin/wstest -m fuzzingclient
 
 kill $PY27_SERVER_PID
-kill $PY35_SERVER_PID
+kill $PY39_SERVER_PID
 kill $PYPY_SERVER_PID
 wait
 
index 289d127b10b4cd0eaee9e0afa01383836cedfc18..7c4b72ebc667eeabc25dbc3789bbf89493a172a5 100644 (file)
@@ -2,7 +2,7 @@
 # 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]
index e00a914f3c9287b1754f0cc12d8dbd68693a8ff9..a365d2c33ccc6976b4fe2bdcf4daace85788df01 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,7 +2,7 @@
 license_file = LICENSE
 
 [mypy]
-python_version = 3.5
+python_version = 3.6
 no_implicit_optional = True
 
 [mypy-tornado.*,tornado.platform.*]
index e627b1a79f0c27599efe7990c2ecdfb9f9bfa10d..7c9b35c5af0b6d2d6d2ba719c0c1b154a5039d98 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -138,7 +138,7 @@ if (
 
 
 if setuptools is not None:
-    python_requires = ">= 3.5"
+    python_requires = ">= 3.6"
     kwargs["python_requires"] = python_requires
 
 setup(
@@ -180,7 +180,6 @@ 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",
index f0b89a933a415636366781122f89d469a834d0b0..010c9077af1120aadcd0beb9ec4504d40b6d3381 100644 (file)
@@ -651,7 +651,9 @@ class _Option(object):
                 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:
index 3351b9256dfcf5a3c05b99a125acd28ba96e7c00..98b54eabb4b0b241e002662851d8830d626d6f1c 100644 (file)
@@ -33,14 +33,10 @@ from tornado.util import raise_exc_info, basestring_type
 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]
     ]
index 77c5f942eceaf37d28328040c25280aa0aecdce5..b69500e2ac4cc817b930e945498cc2cadc99a50a 100644 (file)
@@ -74,8 +74,7 @@ class TimeoutError(Exception):
 
 
 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:
@@ -115,8 +114,7 @@ class GzipDecompressor(object):
 
     @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:
@@ -168,14 +166,8 @@ def exec_in(
 
 
 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])
diff --git a/tox.ini b/tox.ini
index 8976cab3d4103687cd135fe9ba027ef880834f45..72ec5d5a12c04bb8bf75e53902a7044a1d2eba66 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -13,7 +13,7 @@
 [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
@@ -27,7 +27,6 @@ whitelist_externals = /bin/sh
 [testenv]
 basepython =
            py3: python3
-           py35: python3.5
            py36: python3.6
            py37: python3.7
            py38: python3.8
@@ -64,8 +63,6 @@ setenv =
        # 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