diff --git a/py310.patch b/py310.patch new file mode 100644 index 0000000..48e7bfb --- /dev/null +++ b/py310.patch @@ -0,0 +1,41 @@ +commit d16a94e6a64cf2d0ff9bf3e926b4e08a383faae2 +Author: John Vandenberg +Date: Sun Jan 9 11:31:02 2022 +0800 + + Use collections.abc + +diff --git a/hyper/common/headers.py b/hyper/common/headers.py +index 655a591..6454f55 100644 +--- a/hyper/common/headers.py ++++ b/hyper/common/headers.py +@@ -10,7 +10,7 @@ import collections + 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 4311d30..3405286 100644 +--- a/hyper/http11/connection.py ++++ b/hyper/http11/connection.py +@@ -10,7 +10,7 @@ import os + 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 @@ class HTTP11Connection(object): + return + + # Iterables that set a specific content length. +- elif isinstance(body, collections.Iterable): ++ elif isinstance(body, Iterable): + for item in body: + try: + self._sock.send(item) diff --git a/python-hyper.changes b/python-hyper.changes index 3597636..8e363d0 100644 --- a/python-hyper.changes +++ b/python-hyper.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Jan 9 03:34:01 UTC 2022 - John Vandenberg + +- Add py310.patch to fix Python 3.10 builds + ------------------------------------------------------------------- Fri Dec 31 09:46:39 UTC 2021 - Matej Cepl diff --git a/python-hyper.spec b/python-hyper.spec index 97cf964..7f776ef 100644 --- a/python-hyper.spec +++ b/python-hyper.spec @@ -33,6 +33,7 @@ Patch2: pr-402-h2-settings-fix.patch Patch3: tests-mark-rpmfail_getaddrinfo.patch Patch4: fix-j1-tests.patch Patch5: http20.patch +Patch6: py310.patch BuildRequires: %{python_module brotlipy >= 0.7.0} BuildRequires: %{python_module h2 > 2.5.0} BuildRequires: %{python_module hyperframe >= 3.2}