From: Ben Darnell Date: Mon, 3 Aug 2015 14:06:31 +0000 (-0400) Subject: Drop Python 2.6 support. X-Git-Tag: v4.4.0b1~75^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02e67efa6be92bfd55df7471a956cf5723ddb2b3;p=thirdparty%2Ftornado.git Drop Python 2.6 support. Remove python 2.6 support from all test configurations and docs, but do not actively remove code that exists for 2.6 compatibility. --- diff --git a/.travis.yml b/.travis.yml index 2e34e3915..b6c16e0c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ # https://travis-ci.org/tornadoweb/tornado language: python python: - - 2.6 + - 2.7.8 - 2.7 - pypy - 3.2 @@ -16,8 +16,6 @@ env: - DEPS=false install: - # always install unittest2 on py26 even if $DEPS is unset - - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then travis_retry pip install unittest2; fi - if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then travis_retry pip install futures mock Monotime trollius; fi - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' && $DEPS == true ]]; then travis_retry pip install futures mock; fi # TODO(bdarnell): pycares tests are currently disabled on travis due to ipv6 issues. @@ -50,11 +48,10 @@ script: # the default timeout of 5s. - export ASYNC_TEST_TIMEOUT=15 # We use "python -m coverage" instead of the "bin/coverage" script - # so we can pass additional arguments to python. However, this doesn't - # work on 2.6, so skip coverage on that version. + # so we can pass additional arguments to python. # coverage needs a function that was removed in python 3.6 so we can't # run it with nightly cpython. - - if [[ $TRAVIS_PYTHON_VERSION != 2.6 && $TRAVIS_PYTHON_VERSION != nightly ]]; then export TARGET="-m coverage run $TARGET"; fi + - if [[ $TRAVIS_PYTHON_VERSION != nightly ]]; then export TARGET="-m coverage run $TARGET"; fi - python $TARGET - python $TARGET --ioloop=tornado.platform.select.SelectIOLoop - python -O $TARGET @@ -71,7 +68,7 @@ script: #- if [[ $TRAVIS_PYTHON_VERSION != pypy* && $DEPS == true ]]; then python $TARGET --resolver=tornado.platform.caresresolver.CaresResolver; fi - if [[ $TRAVIS_PYTHON_VERSION == 3* && $TRAVIS_PYTHON_VERSION != '3.2' ]]; then python $TARGET --ioloop_time_monotonic; fi # make coverage reports for Codecov to find - - if [[ $TRAVIS_PYTHON_VERSION != 2.6 && $TRAVIS_PYTHON_VERSION != nightly ]]; then coverage xml; fi + - if [[ $TRAVIS_PYTHON_VERSION != nightly ]]; then coverage xml; fi - export TORNADO_EXTENSION=0 - if [[ $TRAVIS_PYTHON_VERSION == '3.5' && $DEPS == true ]]; then cd ../docs && mkdir sphinx-out && sphinx-build -E -n -W -b html . sphinx-out; fi - if [[ $TRAVIS_PYTHON_VERSION == '2.7' && $DEPS == true ]]; then cd ../docs && mkdir sphinx-doctest-out && sphinx-build -E -n -b doctest . sphinx-out; fi @@ -79,7 +76,7 @@ script: after_success: # call codecov from project root - - if [[ $TRAVIS_PYTHON_VERSION != 2.6 && $TRAVIS_PYTHON_VERSION != nightly ]]; then cd ../ && codecov -e DEPS; fi + - if [[ $TRAVIS_PYTHON_VERSION != nightly ]]; then cd ../ && codecov -e DEPS; fi # This reportedly works around an issue downloading packages from pypi on # travis. Consider removing this after the underlying issue is fixed. diff --git a/docs/index.rst b/docs/index.rst index 577be1590..960952716 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -79,16 +79,13 @@ copy of the source tarball as well. The Tornado source code is `hosted on GitHub `_. -**Prerequisites**: Tornado 4.3 runs on Python 2.6, 2.7, and 3.2+ -(support for Python 2.6 and 3.2 is deprecated and will be removed in +**Prerequisites**: Tornado 4.3 runs on Python 2.7, and 3.2+ +(support for Python 3.2 is deprecated and will be removed in the next release). For Python 2, version 2.7.9 or newer is *strongly* recommended for the improved SSL support. In addition to the requirements which will be installed automatically by ``pip`` or ``setup.py install``, the following optional packages may be useful: -* `unittest2 `_ is needed to run - Tornado's test suite on Python 2.6 (it is unnecessary on more recent - versions of Python) * `concurrent.futures `_ is the recommended thread pool for use with Tornado and enables the use of `~tornado.netutil.ThreadedResolver`. It is needed only on Python 2; diff --git a/maint/test/websocket/fuzzingclient.json b/maint/test/websocket/fuzzingclient.json index 9e07e830d..5f5c3619b 100644 --- a/maint/test/websocket/fuzzingclient.json +++ b/maint/test/websocket/fuzzingclient.json @@ -3,13 +3,11 @@ "outdir": "./reports/servers", "servers": [ - {"agent": "Tornado/py26", "url": "ws://localhost:9001", + {"agent": "Tornado/py27", "url": "ws://localhost:9001", "options": {"version": 18}}, - {"agent": "Tornado/py27", "url": "ws://localhost:9002", + {"agent": "Tornado/py34", "url": "ws://localhost:9002", "options": {"version": 18}}, - {"agent": "Tornado/py32", "url": "ws://localhost:9003", - "options": {"version": 18}}, - {"agent": "Tornado/pypy", "url": "ws://localhost:9004", + {"agent": "Tornado/pypy", "url": "ws://localhost:9003", "options": {"version": 18}} ], diff --git a/maint/test/websocket/run-client.sh b/maint/test/websocket/run-client.sh index 9ed974a92..23b69ec9d 100755 --- a/maint/test/websocket/run-client.sh +++ b/maint/test/websocket/run-client.sh @@ -9,9 +9,8 @@ FUZZING_SERVER_PID=$! sleep 1 -.tox/py26/bin/python client.py --name='Tornado/py26' .tox/py27/bin/python client.py --name='Tornado/py27' -.tox/py32/bin/python client.py --name='Tornado/py32' +.tox/py34/bin/python client.py --name='Tornado/py32' .tox/pypy/bin/python client.py --name='Tornado/pypy' kill $FUZZING_SERVER_PID diff --git a/maint/test/websocket/run-server.sh b/maint/test/websocket/run-server.sh index 95a14ea3b..c6624f5b4 100755 --- a/maint/test/websocket/run-server.sh +++ b/maint/test/websocket/run-server.sh @@ -12,23 +12,19 @@ set -e # build/update the virtualenvs tox -.tox/py26/bin/python server.py --port=9001 & -PY26_SERVER_PID=$! - -.tox/py27/bin/python server.py --port=9002 & +.tox/py27/bin/python server.py --port=9001 & PY27_SERVER_PID=$! -.tox/py32/bin/python server.py --port=9003 & +.tox/py34/bin/python server.py --port=9002 & PY32_SERVER_PID=$! -.tox/pypy/bin/python server.py --port=9004 & +.tox/pypy/bin/python server.py --port=9003 & PYPY_SERVER_PID=$! sleep 1 .tox/py27/bin/wstest -m fuzzingclient -kill $PY26_SERVER_PID kill $PY27_SERVER_PID kill $PY32_SERVER_PID kill $PYPY_SERVER_PID diff --git a/maint/test/websocket/tox.ini b/maint/test/websocket/tox.ini index 696074102..a959f6e40 100644 --- a/maint/test/websocket/tox.ini +++ b/maint/test/websocket/tox.ini @@ -2,7 +2,7 @@ # to install autobahn and build the speedups module. # See run.sh for the real test runner. [tox] -envlist = py27, py32, py26, pypy +envlist = py27, py32, pypy setupdir=../../.. [testenv] diff --git a/maint/vm/ubuntu10.04/tox.ini b/maint/vm/ubuntu10.04/tox.ini index 21944e819..25c323038 100644 --- a/maint/vm/ubuntu10.04/tox.ini +++ b/maint/vm/ubuntu10.04/tox.ini @@ -1,21 +1,11 @@ [tox] -envlist = py27-full, py32, py26, py26-full, py27 +envlist = py27-full, py32, py27 setupdir=/tornado toxworkdir=/home/vagrant/tox-tornado [testenv] commands = python -m tornado.test.runtests {posargs:} -[testenv:py26] -deps = unittest2 - -[testenv:py26-full] -deps = - futures - pycurl - twisted==11.0.0 - unittest2 - [testenv:py27-full] basepython = python2.7 deps = diff --git a/maint/vm/windows/bootstrap.py b/maint/vm/windows/bootstrap.py index 669981c74..b23cf674b 100644 --- a/maint/vm/windows/bootstrap.py +++ b/maint/vm/windows/bootstrap.py @@ -28,7 +28,6 @@ import urllib TMPDIR = r'c:\tornado_bootstrap' PYTHON_VERSIONS = [ - (r'c:\python26\python.exe', 'http://www.python.org/ftp/python/2.6.6/python-2.6.6.msi'), (r'c:\python27\python.exe', 'http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi'), (r'c:\python32\python.exe', 'http://www.python.org/ftp/python/3.2.3/python-3.2.3.msi'), (r'c:\python33\python.exe', 'http://www.python.org/ftp/python/3.3.0/python-3.3.0.msi'), diff --git a/maint/vm/windows/tox.ini b/maint/vm/windows/tox.ini index ec7c571ca..da9998f9a 100644 --- a/maint/vm/windows/tox.ini +++ b/maint/vm/windows/tox.ini @@ -1,21 +1,11 @@ [tox] -envlist = py27-full, py32-full, py26, py26-full, py27, py32, py33, py27-opt, py33-monotonic +envlist = py27-full, py32-full, py27, py32, py33, py27-opt, py33-monotonic setupdir = e:\ toxworkdir = c:\tox-tornado [testenv] commands = python -m tornado.test.runtests {posargs:} -[testenv:py26] -deps = unittest2 - -[testenv:py26-full] -basepython = python2.6 -deps = - futures - mock - unittest2 - [testenv:py27-full] basepython = python2.7 deps = diff --git a/setup.py b/setup.py index 437ae8b4a..cbb2397f8 100644 --- a/setup.py +++ b/setup.py @@ -170,7 +170,6 @@ setup( classifiers=[ 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', diff --git a/tox.ini b/tox.ini index dc3b9fb6b..59c23608b 100644 --- a/tox.ini +++ b/tox.ini @@ -15,8 +15,8 @@ envlist = # Basic configurations: Run the tests in both minimal installations # and with all optional dependencies. # (pypy3 doesn't have any optional deps yet) - {py26,py27,pypy,py32,py33,py34,py35,pypy3}, - {py26,py27,pypy,py32,py33,py34,py35}-full, + {py27,pypy,py32,py33,py34,py35,pypy3}, + {py27,pypy,py32,py33,py34,py35}-full, # Also run the tests with each possible replacement of a default # component. Run each test on both python 2 and 3 where possible. @@ -28,10 +28,10 @@ envlist = # Alternate IOLoops. {py2,py3}-select, - {py2,py26,py3}-full-twisted, + {py2,py3}-full-twisted, py2-twistedlayered, {py3,py33}-full-asyncio, - {py26,py2}-full-trollius, + py2-full-trollius, # Alternate Resolvers. {py2,py3}-full-{threadedresolver}, @@ -53,7 +53,6 @@ envlist = # Most of these are defaults, but if you specify any you can't fall back # defaults for the others. basepython = - py26: python2.6 py27: python2.7 py32: python3.2 py33: python3.3 @@ -65,28 +64,25 @@ basepython = py3: python3.5 deps = - # unittest2 is a hard requirement on py26. - py26: unittest2 # unittest2 doesn't add anything we need on 2.7+, but we should ensure that # its existence doesn't break anything due to conditional imports. py27-unittest2: unittest2 py3-unittest2: unittest2py3k # cpython-only deps: pycurl installs but curl_httpclient doesn't work; # twisted mostly works but is a bit flaky under pypy. - {py26,py27,py32,py33,py34,py35}-full: pycurl + {py27,py32,py33,py34,py35}-full: pycurl {py2,py3}: pycurl>=7.19.3.1 # twisted is cpython only and doesn't support py32. - {py26,py27,py33,py34,py35}-full: twisted + {py27,py33,py34,py35}-full: twisted {py2,py3}: twisted # pycares installation currently fails on py33 # (https://github.com/pypa/pip/pull/816) - {py2,py26,py27,py32,py33,py34,py35}-full: pycares + {py2,py27,py32,py33,py34,py35}-full: pycares # futures became standard in py32 - {py2,py26,py27,pypy}-full: futures + {py2,py27,pypy}-full: futures # mock became standard in py33 - {py2,py26,py27,pypy,py3,py32,pypy3}-full: mock - # singledispatch became standard in py34. It mostly works on py26 - # but has problems with old-style classes as used in that version. + {py2,py27,pypy,py3,py32,pypy3}-full: mock + # singledispatch became standard in py34. {py2,py27,pypy,py3,py32,py33}-full: singledispatch py33-asyncio: asyncio trollius: trollius @@ -96,7 +92,7 @@ deps = setenv = # The extension is mandatory on cpython. - {py2,py26,py27,py3,py32,py33,py34,py35}: TORNADO_EXTENSION=1 + {py2,py27,py3,py32,py33,py34,py35}: TORNADO_EXTENSION=1 # In python 3, opening files in text mode uses a # system-dependent encoding by default. Run the tests with "C" # (ascii) and "utf-8" locales to ensure we don't have hidden @@ -105,7 +101,7 @@ setenv = lang_utf8: LANG=en_US.utf-8 # tox's parser chokes if all the setenv entries are conditional. DUMMY=dummy - {py2,py26,py27,py3,py32,py33,py34,py35}-no-ext: TORNADO_EXTENSION=0 + {py2,py27,py3,py32,py33,py34,py35}-no-ext: TORNADO_EXTENSION=0 # All non-comment lines but the last must end in a backslash. # Tox filters line-by-line based on the environment name.