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

Commit 1ac0747

Browse files
committed
Strip framing layer, vendor hyperframe 6b09cf1
1 parent d12cb83 commit 1ac0747

File tree

8 files changed

+29
-524
lines changed

8 files changed

+29
-524
lines changed

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ omit =
44
hyper/httplib_compat.py
55
hyper/ssl_compat.py
66
hyper/http20/hpack_compat.py
7+
hyper/packages/*

hyper/http20/connection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
from ..common.exceptions import ConnectionResetError
1010
from ..common.bufsocket import BufferedSocket
1111
from ..common.headers import HTTPHeaderMap
12-
from .hpack_compat import Encoder, Decoder
13-
from .stream import Stream
14-
from .frame import (
12+
from ..packages.hyperframe.frame import (
1513
FRAMES, DataFrame, HeadersFrame, PushPromiseFrame, RstStreamFrame,
1614
SettingsFrame, Frame, WindowUpdateFrame, GoAwayFrame, PingFrame,
1715
BlockedFrame
1816
)
17+
from .hpack_compat import Encoder, Decoder
18+
from .stream import Stream
1919
from .response import HTTP20Response, HTTP20Push
2020
from .window import FlowControlManager
2121
from .exceptions import ConnectionError

hyper/http20/stream.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
the stream by the endpoint that initiated the stream.
1515
"""
1616
from ..common.headers import HTTPHeaderMap
17-
from .exceptions import ProtocolError
18-
from .frame import (
17+
from ..packages.hyperframe.frame import (
1918
FRAME_MAX_LEN, FRAMES, HeadersFrame, DataFrame, PushPromiseFrame,
2019
WindowUpdateFrame, ContinuationFrame, BlockedFrame
2120
)
21+
from .exceptions import ProtocolError
2222
from .util import h2_safe_headers
2323
import collections
2424
import logging

hyper/packages/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
hyper/packages
4+
~~~~~~~~~~~~~~
5+
6+
This module contains external packages that are vendored into hyper.
7+
"""

hyper/packages/hyperframe/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- coding: utf-8 -*-
2+
"""
3+
hyperframe
4+
~~~~~~~~~~
5+
6+
A module for providing a pure-Python HTTP/2 framing layer.
7+
"""
8+
__version__ = '1.0.0'

hyper/http20/frame.py renamed to hyper/packages/hyperframe/frame.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
hyper/http20/frame
4-
~~~~~~~~~~~~~~~~~~
3+
hyperframe/frame
4+
~~~~~~~~~~~~~~~~
55
66
Defines framing logic for HTTP/2. Provides both classes to represent framed
77
data and logic for aiding the connection when it comes to reading from the
@@ -13,6 +13,7 @@
1313
# The maximum length of a frame. Some frames have shorter maximum lengths.
1414
FRAME_MAX_LEN = (2 ** 14) - 1
1515

16+
1617
class Frame(object):
1718
"""
1819
The base class for all HTTP/2 frames.

0 commit comments

Comments
 (0)