Skip to content

Commit

Permalink
Merge pull request #2432 from bdarnell/py37
Browse files Browse the repository at this point in the history
build: Add Python 3.7 to tox and travis configs
  • Loading branch information
bdarnell authored Jul 11, 2018
2 parents cb79c89 + 9fb12bb commit db3e02b
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
12 changes: 12 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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%"
Expand Down
2 changes: 1 addition & 1 deletion demos/blog/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.6
FROM python:3.7

EXPOSE 8888

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ def build_extension(self, ext):
'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',
],
Expand Down
4 changes: 3 additions & 1 deletion tornado/test/autoreload_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ def test_reload_wrapper_preservation(self):
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)
Expand Down
2 changes: 1 addition & 1 deletion tornado/test/iostream_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ def test_future_write(self):
"""
# 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)
Expand Down
19 changes: 10 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -95,15 +96,15 @@ 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.
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
Expand Down

0 comments on commit db3e02b

Please sign in to comment.