Skip to content

Commit

Permalink
Merge branch 'fried-patch-2' into fried-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
jquast committed Sep 13, 2020
2 parents cdc1099 + 8fd00b5 commit 5d138a5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions telnetlib3/stream_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import collections
import logging
import struct
import sys

# local imports
from . import slc
Expand Down Expand Up @@ -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)):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{35,36,37}, docs
envlist = py{35,36,37,38}, docs
skip_missing_interpreters = true

[testenv]
Expand Down

0 comments on commit 5d138a5

Please sign in to comment.