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 4311d307..57d1ed9e 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 @@ -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) 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},