- Add pr-402-http20-enable-push-fix.patch from upstream to fix http20 connection initialisation - Improve fix-dependencies.patch removing upper constraints - Merge hyper executable into main package - Remove bcond test - Simplify test invocation - Add missing test dependency 'futures' on Python 2.7 - Update to version 0.7.0+git88.18b629b: * Add a fix to make it possible to add window_manager to HTTP20Adapter. * Add support for brotli compression * Fix crash on getting unsupported content-encoding * fix HTTP/1.1 response body length * fix HTTP/1.1 response body length * fix some error * Add test function for length of the HTTP/1.1 response-body. * fix HEAD request body length * fix test_release (http2bin to nghttp2.org/httpbin) - Initial spec for version 0.7.0+git88.18b629b, adding fix-test.patch to de-vendor the tests and fix-dependencies.patch to unpin dependencies OBS-URL: https://build.opensuse.org/request/show/689405 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hyper?expand=0&rev=1
75 lines
2.7 KiB
Diff
75 lines
2.7 KiB
Diff
From 88d4e67ce68abad64647582a95a1b786394109b5 Mon Sep 17 00:00:00 2001
|
|
From: John Vandenberg <jayvdb@gmail.com>
|
|
Date: Thu, 28 Mar 2019 15:13:16 +0700
|
|
Subject: [PATCH 1/2] HTTP20Connection: Fix use of h2.settings
|
|
|
|
Fixes https://github.com/Lukasa/hyper/issues/372
|
|
---
|
|
hyper/http20/connection.py | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/hyper/http20/connection.py b/hyper/http20/connection.py
|
|
index b8be292b..c6df953f 100644
|
|
--- a/hyper/http20/connection.py
|
|
+++ b/hyper/http20/connection.py
|
|
@@ -7,7 +7,7 @@
|
|
"""
|
|
import h2.connection
|
|
import h2.events
|
|
-import h2.settings
|
|
+from h2.settings import SettingCodes
|
|
|
|
from ..compat import ssl
|
|
from ..tls import wrap_socket, H2_NPN_PROTOCOLS, H2C_PROTOCOL
|
|
@@ -403,7 +403,7 @@ def _connect_upgrade(self, sock):
|
|
with self._conn as conn:
|
|
conn.initiate_upgrade_connection()
|
|
conn.update_settings(
|
|
- {h2.settings.ENABLE_PUSH: int(self._enable_push)}
|
|
+ {SettingCodes.ENABLE_PUSH: int(self._enable_push)}
|
|
)
|
|
self._send_outstanding_data()
|
|
|
|
@@ -424,7 +424,7 @@ def _send_preamble(self):
|
|
with self._conn as conn:
|
|
conn.initiate_connection()
|
|
conn.update_settings(
|
|
- {h2.settings.ENABLE_PUSH: int(self._enable_push)}
|
|
+ {SettingCodes.ENABLE_PUSH: int(self._enable_push)}
|
|
)
|
|
self._send_outstanding_data()
|
|
|
|
|
|
From cf3bef7ab81ee559c7f13ff094dfd5382884ee1f Mon Sep 17 00:00:00 2001
|
|
From: John Vandenberg <jayvdb@gmail.com>
|
|
Date: Thu, 28 Mar 2019 19:20:33 +0700
|
|
Subject: [PATCH 2/2] tests: Fix use of h2.settings
|
|
|
|
---
|
|
test/test_hyper.py | 5 ++---
|
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/test/test_hyper.py b/test/test_hyper.py
|
|
index b826c63c..9b220ca3 100644
|
|
--- a/test/test_hyper.py
|
|
+++ b/test/test_hyper.py
|
|
@@ -1,8 +1,7 @@
|
|
# -*- coding: utf-8 -*-
|
|
-import h2.settings
|
|
-
|
|
from h2.frame_buffer import FrameBuffer
|
|
from h2.connection import ConnectionState
|
|
+from h2.settings import SettingCodes
|
|
from hyperframe.frame import (
|
|
Frame, DataFrame, RstStreamFrame, SettingsFrame, PushPromiseFrame,
|
|
WindowUpdateFrame, HeadersFrame, ContinuationFrame, GoAwayFrame,
|
|
@@ -766,7 +765,7 @@ def test_incrementing_window_after_close(self):
|
|
# the default max frame size (16,384 bytes). That will, on the third
|
|
# frame, trigger the processing to increment the flow control window,
|
|
# which should then not happen.
|
|
- f = SettingsFrame(0, settings={h2.settings.INITIAL_WINDOW_SIZE: 100})
|
|
+ f = SettingsFrame(0, settings={SettingCodes.INITIAL_WINDOW_SIZE: 100})
|
|
|
|
c = HTTP20Connection('www.google.com')
|
|
c._sock = DummySocket()
|