Merge pull request #2432 from bdarnell/py37

build: Add Python 3.7 to tox and travis configs
This commit is contained in:
Ben Darnell 2018-07-10 21:46:11 -04:00 committed by GitHub
commit db3e02b0cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 12 deletions

View File

@ -38,6 +38,18 @@ environment:
TOX_ENV: "py36"
TOX_ARGS: ""
- PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "32"
TOX_ENV: "py37"
TOX_ARGS: "tornado.test.websocket_test"
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"
TOX_ENV: "py37"
TOX_ARGS: ""
install:
# Make sure the right python version is first on the PATH.
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"

View File

@ -1,4 +1,4 @@
FROM python:3.6
FROM python:3.7
EXPOSE 8888

View File

@ -188,6 +188,7 @@ setup(
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],

View File

@ -100,7 +100,9 @@ else:
env=dict(os.environ, PYTHONPATH=pythonpath),
universal_newlines=True)
for i in range(20):
# This timeout needs to be fairly generous for pypy due to jit
# warmup costs.
for i in range(40):
if autoreload_proc.poll() is not None:
break
time.sleep(0.1)

View File

@ -1028,7 +1028,7 @@ class TestIOStreamMixin(TestReadWriteMixin):
"""
# Run concurrent writers that will write enough bytes so as to
# clog the socket buffer and accumulate bytes in our write buffer.
m, n = 10000, 1000
m, n = 5000, 1000
nproducers = 10
total_bytes = m * n * nproducers
server, client = yield self.make_iostream_pair(max_buffer_size=total_bytes)

19
tox.ini
View File

@ -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)
{py27,pypy,py34,py35,py36,pypy3},
{py27,pypy,py34,py35,py36}-full,
{py27,pypy,py34,py35,py36,py37,pypy3},
{py27,pypy,py34,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.
@ -57,10 +57,11 @@ basepython =
py34: python3.4
py35: python3.5
py36: python3.6
py37: python3.7
pypy: pypy
pypy3: pypy3
py2: python2.7
py3: python3.6
py3: python3.7
deps =
# unittest2 doesn't add anything we need on 2.7+, but we should ensure that
@ -69,12 +70,12 @@ deps =
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}-full: pycurl
{py27,py34,py35,py36,py37}-full: pycurl
{py2,py3}: pycurl>=7.19.3.1
# twisted is cpython only.
{py27,py34,py35,py36}-full: twisted
{py27,py34,py35,py36,py37}-full: twisted
{py2,py3}: twisted
{py2,py3,py27,py34,py35,py36}-full: pycares
{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.
@ -86,7 +87,7 @@ deps =
setenv =
# The extension is mandatory on cpython.
{py2,py27,py3,py34,py35,py36}: TORNADO_EXTENSION=1
{py2,py27,py3,py34,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
@ -95,7 +96,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}-no-ext: TORNADO_EXTENSION=0
{py2,py27,py3,py34,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.
@ -103,7 +104,7 @@ commands =
python \
# py3*: -b turns on an extra warning when calling
# str(bytes), and -bb makes it an error.
{py3,py34,py35,py36,pypy3}: -bb \
{py3,py34,py35,py36,py37,pypy3}: -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