Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 4be85ea

Browse files
committed
Move TLS module up a level.
1 parent 9a4a9f8 commit 4be85ea

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

hyper/http20/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
66
Objects that build hyper's connection-level HTTP/2 abstraction.
77
"""
8+
from ..tls import wrap_socket
89
from .hpack_compat import Encoder, Decoder
910
from .stream import Stream
10-
from .tls import wrap_socket
1111
from .frame import (
1212
FRAMES, DataFrame, HeadersFrame, PushPromiseFrame, RstStreamFrame,
1313
SettingsFrame, Frame, WindowUpdateFrame, GoAwayFrame, PingFrame,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"""
88
import os.path as path
99

10-
from ..compat import ignore_missing, ssl
10+
from .compat import ignore_missing, ssl
1111

1212

1313
NPN_PROTOCOL = 'h2'
@@ -20,7 +20,7 @@
2020
_context = None
2121

2222
# Work out where our certificates are.
23-
cert_loc = path.join(path.dirname(__file__), '..', 'certs.pem')
23+
cert_loc = path.join(path.dirname(__file__), 'certs.pem')
2424

2525
def wrap_socket(sock, server_hostname):
2626
"""

test/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from hyper.http20.huffman_constants import (
2424
REQUEST_CODES, REQUEST_CODES_LENGTH
2525
)
26-
from hyper.http20.tls import NPN_PROTOCOL
26+
from hyper.tls import NPN_PROTOCOL
2727

2828
class SocketServerThread(threading.Thread):
2929
"""

test/test_integration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626

2727
# Turn off certificate verification for the tests.
2828
if ssl is not None:
29-
hyper.http20.tls._context = hyper.http20.tls._init_context()
30-
hyper.http20.tls._context.check_hostname = False
31-
hyper.http20.tls._context.verify_mode = ssl.CERT_NONE
29+
hyper.tls._context = hyper.tls._init_context()
30+
hyper.tls._context.check_hostname = False
31+
hyper.tls._context.verify_mode = ssl.CERT_NONE
3232

3333
def decode_frame(frame_data):
3434
f, length = Frame.parse_frame_header(frame_data[:9])

0 commit comments

Comments
 (0)