From: Ben Darnell Date: Fri, 6 Jul 2018 20:47:50 +0000 (-0400) Subject: build: Stop building and testing with python 2.7 and 3.4 X-Git-Tag: v6.0.0b1~48^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa6a7ff6056fc8b139e51294095050f68076f850;p=thirdparty%2Ftornado.git build: Stop building and testing with python 2.7 and 3.4 Also temporarily remove nightly from the list, because travis's "nightly" on trusty is pinned to an alpha of 3.7 with some slightly different behaviors (testing on 3.7 is covered by appveyor) --- diff --git a/.travis.yml b/.travis.yml index 4a91d36e3..87cb62ecf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,24 +11,19 @@ language: python # For a list of available versions, run # aws s3 ls s3://travis-python-archives/binaries/ubuntu/14.04/x86_64/ python: - - 2.7 - - pypy2.7-5.8.0 - - 3.4 - 3.5 - 3.6 - - nightly - pypy3.5-5.8.0 install: # On nightly, upgrade setuptools first to work around # https://github.com/pypa/setuptools/issues/1257 - if [[ $TRAVIS_PYTHON_VERSION == 'nightly' ]]; then travis_retry pip install -U setuptools; fi - - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then travis_retry pip install mock monotonic; fi - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then travis_retry pip install mock; fi # TODO(bdarnell): pycares tests are currently disabled on travis due to ipv6 issues. #- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install pycares; fi - if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install pycurl; fi - # Twisted runs on 2.x and 3.3+, but is flaky on pypy. + # Twisted is flaky on pypy (TODO: still? this note is quite old) - if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then travis_retry pip install Twisted; fi - if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then travis_retry pip install sphinx sphinx_rtd_theme; fi - if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then travis_retry pip install flake8; fi @@ -65,16 +60,10 @@ script: # run it with nightly cpython. Coverage is very slow on pypy. - if [[ $TRAVIS_PYTHON_VERSION != nightly && $TRAVIS_PYTHON_VERSION != 'pypy'* ]]; then export RUN_COVERAGE=1; fi - if [[ "$RUN_COVERAGE" == 1 ]]; then export TARGET="-m coverage run $TARGET"; fi - - python $TARGET - - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --ioloop=tornado.platform.select.SelectIOLoop; fi + - python -bb $TARGET - python -O $TARGET - LANG=C python $TARGET - LANG=en_US.utf-8 python $TARGET - - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then python -bb $TARGET; fi - - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient; fi - - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --ioloop=tornado.platform.twisted.TwistedIOLoop; fi - - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --resolver=tornado.platform.twisted.TwistedResolver; fi - - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then python $TARGET --ioloop=tornado.ioloop.PollIOLoop --ioloop_time_monotonic; fi #- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then python $TARGET --resolver=tornado.platform.caresresolver.CaresResolver; fi - if [[ $TRAVIS_PYTHON_VERSION != 'pypy3' ]]; then /tmp/nodeps/bin/python -m tornado.test.runtests; fi # make coverage reports for Codecov to find diff --git a/setup.py b/setup.py index e70ba6a07..460f51658 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,6 @@ import os import platform -import ssl import sys import warnings @@ -124,29 +123,9 @@ if (platform.python_implementation() == 'CPython' and if setuptools is not None: - # If setuptools is not available, you're on your own for dependencies. - install_requires = [] - if sys.version_info < (3, 2): - install_requires.append('futures') - if sys.version_info < (3, 4): - install_requires.append('singledispatch') - if sys.version_info < (3, 5): - install_requires.append('backports_abc>=0.4') - kwargs['install_requires'] = install_requires - - python_requires = '>= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, != 3.3.*' + python_requires = '>= 3.5' kwargs['python_requires'] = python_requires -# Verify that the SSL module has all the modern upgrades. Check for several -# names individually since they were introduced at different versions, -# although they should all be present by Python 3.4 or 2.7.9. -if (not hasattr(ssl, 'SSLContext') or - not hasattr(ssl, 'create_default_context') or - not hasattr(ssl, 'match_hostname')): - raise ImportError("Tornado requires an up-to-date SSL module. This means " - "Python 2.7.9+ or 3.4+ (although some distributions have " - "backported the necessary changes to older versions).") - setup( name="tornado", version=version, @@ -182,10 +161,7 @@ setup( " originally developed at FriendFeed."), classifiers=[ 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', diff --git a/tox.ini b/tox.ini index d52898b40..d60a10595 100644 --- a/tox.ini +++ b/tox.ini @@ -15,31 +15,22 @@ envlist = # Basic configurations: Run the tests in both minimal installations # and with all optional dependencies. # (pypy3 doesn't have any optional deps yet) - {py27,pypy,py34,py35,py36,py37,pypy3}, - {py27,pypy,py34,py35,py36,py37}-full, + {py35,py36,py37,pypy3}, + {py35,py36,py37}-full, # Also run the tests with each possible replacement of a default - # component. Run each test on both python 2 and 3 where possible. - # (Only one 2.x and one 3.x unless there are known differences). - # py2 and py3 are aliases for py27-full and py35-full. + # component (only one 3.x version unless there are known differences). # Alternate HTTP clients. - {py2,py3}-curl, - - # Alternate IOLoops. - py2-select, - py2-full-twisted, - py2-twistedlayered, + py3-curl, # Alternate Resolvers. - {py2,py3}-full-caresresolver, + py3-full-caresresolver, # Other configurations; see comments below. - py2-monotonic, - {py2,py3}-opt, + py3-opt, py3-{lang_c,lang_utf8}, - py2-locale, - {py27,py3}-unittest2, + py3-unittest2, # Ensure the sphinx build has no errors or warnings py3-sphinx-docs, @@ -53,8 +44,6 @@ envlist = # Most of these are defaults, but if you specify any you can't fall back # defaults for the others. basepython = - py27: python2.7 - py34: python3.4 py35: python3.5 py36: python3.6 py37: python3.7 @@ -64,30 +53,24 @@ basepython = py3: python3.7 deps = - # unittest2 doesn't add anything we need on 2.7+, but we should ensure that + # unittest2 doesn't add anything we need on py3, 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. - {py27,py34,py35,py36,py37}-full: pycurl - {py2,py3}: pycurl>=7.19.3.1 + {py35,py36,py37}-full: pycurl + py3: pycurl>=7.19.3.1 # twisted is cpython only. - {py27,py34,py35,py36,py37}-full: twisted - {py2,py3}: twisted - {py2,py3,py27,py34,py35,py36,py37}-full: pycares - # mock became standard in py33 - {py2,py27,pypy,pypy3}-full: mock - # singledispatch became standard in py34. - {py2,py27,pypy}-full: singledispatch - py2-monotonic: monotonic + {py35,py36,py37}-full: twisted + py3: twisted + {py3,py35,py36,py37}-full: pycares sphinx: sphinx sphinx: sphinx_rtd_theme lint: flake8 setenv = # The extension is mandatory on cpython. - {py2,py27,py3,py34,py35,py36,py37}: TORNADO_EXTENSION=1 + {py3,py35,py36,py37}: 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 @@ -96,7 +79,7 @@ setenv = lang_utf8: LANG=en_US.utf-8 # tox's parser chokes if all the setenv entries are conditional. DUMMY=dummy - {py2,py27,py3,py34,py35,py36,py37}-no-ext: TORNADO_EXTENSION=0 + {py3,py35,py36,py37}-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. @@ -104,7 +87,7 @@ commands = python \ # py3*: -b turns on an extra warning when calling # str(bytes), and -bb makes it an error. - {py3,py34,py35,py36,py37,pypy3}: -bb \ + -bb \ # Python's optimized mode disables the assert statement, so # run the tests in this mode to ensure we haven't fallen into # the trap of relying on an assertion's side effects or using @@ -115,15 +98,7 @@ commands = # implementations; this flag controls which client all the # other tests use. curl: --httpclient=tornado.curl_httpclient.CurlAsyncHTTPClient \ - poll: --ioloop=tornado.ioloop.PollIOLoop \ - select: --ioloop=tornado.platform.select.SelectIOLoop \ - twisted: --ioloop=tornado.platform.twisted.TwistedIOLoop \ - twistedlayered: --ioloop=tornado.test.twisted_test.LayeredTwistedIOLoop --resolver=tornado.platform.twisted.TwistedResolver \ caresresolver: --resolver=tornado.platform.caresresolver.CaresResolver \ - threadedresolver: --resolver=tornado.netutil.ThreadedResolver \ - monotonic: --ioloop=tornado.ioloop.PollIOLoop --ioloop_time_monotonic \ - # Test with a non-english locale to uncover str/bytes mixing issues. - locale: --locale=zh_TW \ {posargs:} # python will import relative to the current working directory by default, @@ -132,7 +107,7 @@ commands = changedir = {toxworkdir} # tox 1.6 passes --pre to pip by default, which currently has problems -# installing pycurl and monotime (https://github.com/pypa/pip/issues/1405). +# installing pycurl (https://github.com/pypa/pip/issues/1405). # Remove it (it's not a part of {opts}) to only install real releases. install_command = pip install {opts} {packages}