Skip to content

Commit

Permalink
Merge pull request #104 from njsmith/trio-0.11.0-compat
Browse files Browse the repository at this point in the history
Remove references to the deprecated trio.ssl
  • Loading branch information
mehaase committed Feb 12, 2019
2 parents 989fa3a + 5ab8e8b commit 380c7f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
install_requires=[
'async_generator>=1.10,<2',
'ipaddress>=1.0.22,<2',
'trio>=0.9',
'trio>=0.11',
'wsaccel>=0.6.2,<0.7',
'wsproto>=0.12,<0.13',
'yarl>=1.2.6,<2'
Expand Down
6 changes: 3 additions & 3 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
circumstances
'''
from functools import partial, wraps
import ssl

import attr
import pytest
Expand Down Expand Up @@ -178,9 +179,8 @@ async def test_serve(nursery):


async def test_serve_ssl(nursery):
server_context = trio.ssl.create_default_context(
trio.ssl.Purpose.CLIENT_AUTH)
client_context = trio.ssl.create_default_context()
server_context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
client_context = ssl.create_default_context()
ca = trustme.CA()
ca.configure_trust(client_context)
cert = ca.issue_server_cert(HOST)
Expand Down
3 changes: 1 addition & 2 deletions trio_websocket/_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from ipaddress import ip_address
import trio
import trio.abc
import trio.ssl
import wsproto.connection as wsconnection
import wsproto.frame_protocol as wsframeproto
from wsproto.events import BytesReceived
Expand Down Expand Up @@ -1063,7 +1062,7 @@ def listeners(self):
if isinstance(listener, trio.SocketListener):
socket = listener.socket
is_ssl = False
elif isinstance(listener, trio.ssl.SSLListener):
elif isinstance(listener, trio.SSLListener):
socket = listener.transport_listener.socket
is_ssl = True
else:
Expand Down

0 comments on commit 380c7f4

Please sign in to comment.