Skip to content

Commit 3b6f4e7

Browse files
Remove python 3.5 support (#138)
Closes #112
1 parent c393563 commit 3b6f4e7

File tree

6 files changed

+8
-96
lines changed

6 files changed

+8
-96
lines changed

.travis.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,17 @@ git:
66

77
jobs:
88
include:
9-
- python: 3.5
10-
env: REQUIREMENTS=requirements-dev-3.5.txt
119
- python: 3.6
12-
env: REQUIREMENTS=requirements-dev.txt
1310
- python: 3.7
14-
env: REQUIREMENTS=requirements-dev.txt
1511
- python: 3.8
16-
env: REQUIREMENTS=requirements-dev.txt
1712
- python: 3.9
18-
env: REQUIREMENTS=requirements-dev.txt
1913
- python: pypy3
20-
env: REQUIREMENTS=requirements-dev.txt
2114
- name: "latest deps"
2215
python: 3.9
23-
env: REQUIREMENTS=requirements-dev.txt UPGRADE="pip install --upgrade trio wsproto"
16+
env: UPGRADE="pip install --upgrade trio wsproto"
2417

2518
install:
26-
- pip install -r $REQUIREMENTS
19+
- pip install -r requirements-dev.txt
2720
- $UPGRADE
2821
- pip install -e .
2922

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ same port is straightforward. There has yet to be a performance comparison.
2929

3030
## Installation
3131

32-
This library requires Python 3.5 or greater. To install from PyPI:
32+
This library requires Python 3.6 or greater. To install from PyPI:
3333

3434
pip install trio-websocket
3535

requirements-dev-3.5.txt

Lines changed: 0 additions & 76 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@
2828
'Intended Audience :: Developers',
2929
'Topic :: Software Development :: Libraries',
3030
'License :: OSI Approved :: MIT License',
31-
'Programming Language :: Python :: 3.5',
3231
'Programming Language :: Python :: 3.6',
3332
'Programming Language :: Python :: 3.7',
3433
'Programming Language :: Python :: 3.8',
3534
'Programming Language :: Python :: 3.9',
3635
'Programming Language :: Python :: Implementation :: CPython',
3736
'Programming Language :: Python :: Implementation :: PyPy',
3837
],
39-
python_requires=">=3.5",
38+
python_requires=">=3.6",
4039
keywords='websocket client server trio',
4140
packages=find_packages(exclude=['docs', 'examples', 'tests']),
4241
install_requires=[

tests/test_connection.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import pytest
3838
import trio
3939
import trustme
40-
from async_generator import async_generator, yield_
4140
from trio.testing import memory_stream_pair
4241
from wsproto.events import CloseConnection
4342

@@ -78,24 +77,22 @@
7877

7978

8079
@pytest.fixture
81-
@async_generator
8280
async def echo_server(nursery):
8381
''' A server that reads one message, sends back the same message,
8482
then closes the connection. '''
8583
serve_fn = partial(serve_websocket, echo_request_handler, HOST, 0,
8684
ssl_context=None)
8785
server = await nursery.start(serve_fn)
88-
await yield_(server)
86+
yield server
8987

9088

9189
@pytest.fixture
92-
@async_generator
9390
async def echo_conn(echo_server):
9491
''' Return a client connection instance that is connected to an echo
9592
server. '''
9693
async with open_websocket(HOST, echo_server.port, RESOURCE,
9794
use_ssl=False) as conn:
98-
await yield_(conn)
95+
yield conn
9996

10097

10198
async def echo_request_handler(request):

trio_websocket/_impl.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import struct
1010
import urllib.parse
1111

12-
from async_generator import async_generator, yield_, asynccontextmanager
12+
from async_generator import asynccontextmanager
1313
import trio
1414
import trio.abc
1515
from wsproto import ConnectionType, WSConnection
@@ -65,7 +65,6 @@ def remove_cancels(exc):
6565

6666

6767
@asynccontextmanager
68-
@async_generator
6968
async def open_websocket(host, port, resource, *, use_ssl, subprotocols=None,
7069
extra_headers=None,
7170
message_queue_size=MESSAGE_QUEUE_SIZE, max_message_size=MAX_MESSAGE_SIZE,
@@ -115,7 +114,7 @@ async def open_websocket(host, port, resource, *, use_ssl, subprotocols=None,
115114
except OSError as e:
116115
raise HandshakeError from e
117116
try:
118-
await yield_(connection)
117+
yield connection
119118
finally:
120119
try:
121120
with trio.fail_after(disconnect_timeout):

0 commit comments

Comments
 (0)