From ce7d48eddf9e8864567e384bb25d8d534d412ca2 Mon Sep 17 00:00:00 2001 From: Jason Fried Date: Sat, 12 Sep 2020 23:16:37 -0700 Subject: [PATCH 1/2] tox for py38 --- telnetlib3/stream_writer.py | 5 +++++ tox.ini | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/telnetlib3/stream_writer.py b/telnetlib3/stream_writer.py index 798a808..c6866a1 100644 --- a/telnetlib3/stream_writer.py +++ b/telnetlib3/stream_writer.py @@ -4,6 +4,7 @@ import collections import logging import struct +import sys # local imports from . import slc @@ -89,6 +90,10 @@ def __init__(self, transport, protocol, *, client=False, server=False, use. The return value of :func:`asyncio.get_event_loop` is used when unset. """ + # fix tests in 3.8 + if loop is None and sys.version_info[:2] >= (3, 8): + loop = asyncio.get_event_loop() + asyncio.StreamWriter.__init__(self, transport, protocol, reader, loop) if not any((client, server)) or all((client, server)): diff --git a/tox.ini b/tox.ini index 5772ca5..38952cb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{35,36,37}, docs +envlist = py{35,36,37,38}, docs skip_missing_interpreters = true [testenv] From 8fd00b5135929e9235d46db95f002df6f2fd6c33 Mon Sep 17 00:00:00 2001 From: Jason Fried Date: Sat, 12 Sep 2020 23:21:47 -0700 Subject: [PATCH 2/2] update travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index d74f30c..5b13fb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ matrix: env: ASYNCIODEBUG=1 TOXENV=py36 COVERAGE_ID=travis-ci - python: 3.7 env: ASYNCIODEBUG=1 TOXENV=py37 COVERAGE_ID=travis-ci + - python: 3.8 + env: ASYNCIODEBUG=1 TOXENV=py38 COVERAGE_ID=travis-ci install: - pip install tox