From e42a6e87bd1179cfb81bfdbd8708109862853541 Mon Sep 17 00:00:00 2001 From: WEI-CHUN KAO Date: Tue, 17 Jan 2023 12:01:22 +0800 Subject: [PATCH 1/3] fix import --- hyper/http11/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyper/http11/connection.py b/hyper/http11/connection.py index 4311d307..e9523745 100644 --- a/hyper/http11/connection.py +++ b/hyper/http11/connection.py @@ -10,7 +10,7 @@ import socket import base64 -from collections import Iterable, Mapping +from collections.abc import Iterable, Mapping import collections from hyperframe.frame import SettingsFrame From abe846d60137c27c3d6f1b3863208a34f08fbc2a Mon Sep 17 00:00:00 2001 From: WEI-CHUN KAO Date: Tue, 17 Jan 2023 12:03:18 +0800 Subject: [PATCH 2/3] fix MutableSet & Interable path from collections to collections.abc --- hyper/common/headers.py | 2 +- hyper/http11/connection.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hyper/common/headers.py b/hyper/common/headers.py index 655a591a..6454f550 100644 --- a/hyper/common/headers.py +++ b/hyper/common/headers.py @@ -10,7 +10,7 @@ from hyper.common.util import to_bytestring, to_bytestring_tuple -class HTTPHeaderMap(collections.MutableMapping): +class HTTPHeaderMap(collections.abc.MutableMapping): """ A structure that contains HTTP headers. diff --git a/hyper/http11/connection.py b/hyper/http11/connection.py index e9523745..57d1ed9e 100644 --- a/hyper/http11/connection.py +++ b/hyper/http11/connection.py @@ -390,7 +390,7 @@ def _send_body(self, body, body_type): return # Iterables that set a specific content length. - elif isinstance(body, collections.Iterable): + elif isinstance(body, collections.abc.Iterable): for item in body: try: self._sock.send(item) From 574ee084ac52b10c211795e663872608f1eed472 Mon Sep 17 00:00:00 2001 From: WEI-CHUN KAO Date: Tue, 17 Jan 2023 12:12:29 +0800 Subject: [PATCH 3/3] remove version upperbound for h2 and hyperframe --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 94cd8d21..2b53432b 100644 --- a/setup.py +++ b/setup.py @@ -77,7 +77,7 @@ def run_tests(self): 'Programming Language :: Python :: Implementation :: CPython', ], install_requires=[ - 'h2>=2.4,<3.0,!=2.5.0', 'hyperframe>=3.2,<4.0', 'rfc3986>=1.1.0,<2.0', 'brotlipy>=0.7.0,<1.0' + 'h2>=2.4,!=2.5.0', 'hyperframe>=3.2', 'rfc3986>=1.1.0,<2.0', 'brotlipy>=0.7.0,<1.0' ], tests_require=['pytest', 'requests', 'mock'], cmdclass={'test': PyTest},