diff --git a/Fix-repr-checks-for-Python-3.11.patch b/Fix-repr-checks-for-Python-3.11.patch deleted file mode 100644 index 685f8f8a9bab7da7e93a4dce06af2a5195d3ecb5..0000000000000000000000000000000000000000 --- a/Fix-repr-checks-for-Python-3.11.patch +++ /dev/null @@ -1,109 +0,0 @@ -From eabe727282e7a7aa3254773292f86cf341bdc597 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= -Date: Sun, 3 Jul 2022 12:05:05 +0200 -Subject: [PATCH] Fix repr() checks for Python 3.11 - -In Python 3.11, repr() was modified, this commit fixes the -assertions to match the new repr() behavior. - -Fix #1268 - -Origin: https://github.com/python-hyper/h2/pull/1274 ---- - test/test_events.py | 62 ++++++++++++++++++++++++++++++++------------- - 1 file changed, 44 insertions(+), 18 deletions(-) - -diff --git a/test/test_events.py b/test/test_events.py -index a6e8d8379..c790fbaa0 100644 ---- a/test/test_events.py -+++ b/test/test_events.py -@@ -207,11 +207,18 @@ def test_remotesettingschanged_repr(self): - ), - } - -- assert repr(e) == ( -- "" -- ) -+ if sys.version_info >= (3, 11): -+ assert repr(e) == ( -+ "" -+ ) -+ else: -+ assert repr(e) == ( -+ "" -+ ) - - def test_pingreceived_repr(self): - """ -@@ -249,10 +256,16 @@ def test_streamreset_repr(self): - e.error_code = h2.errors.ErrorCodes.ENHANCE_YOUR_CALM - e.remote_reset = False - -- assert repr(e) == ( -- "" -- ) -+ if sys.version_info >= (3, 11): -+ assert repr(e) == ( -+ "" -+ ) -+ else: -+ assert repr(e) == ( -+ "" -+ ) - - def test_pushedstreamreceived_repr(self): - """ -@@ -284,11 +297,18 @@ def test_settingsacknowledged_repr(self): - ), - } - -- assert repr(e) == ( -- "" -- ) -+ if sys.version_info >= (3, 11): -+ assert repr(e) == ( -+ "" -+ ) -+ else: -+ assert repr(e) == ( -+ "" -+ ) - - def test_priorityupdated_repr(self): - """ -@@ -318,10 +338,16 @@ def test_connectionterminated_repr(self, additional_data, data_repr): - e.last_stream_id = 33 - e.additional_data = additional_data - -- assert repr(e) == ( -- "" % data_repr -- ) -+ if sys.version_info >= (3, 11): -+ assert repr(e) == ( -+ "" % data_repr -+ ) -+ else: -+ assert repr(e) == ( -+ "" % data_repr -+ ) - - def test_alternativeserviceavailable_repr(self): - """ diff --git a/h2-4.1.0.tar.gz b/h2-4.1.0.tar.gz deleted file mode 100644 index feefb12017dfa057d4d4b208cd8e3076ec48b1bd..0000000000000000000000000000000000000000 Binary files a/h2-4.1.0.tar.gz and /dev/null differ diff --git a/h2-4.2.0.tar.gz b/h2-4.2.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6b7966de46176b21d5ca4d5c64c7b84581e8177b Binary files /dev/null and b/h2-4.2.0.tar.gz differ diff --git a/python-h2.spec b/python-h2.spec index dc0df155fcae78d4966d75f564b8a58adac4e0c0..09d165e110f21c2d974b9cec694ca266a309a82f 100644 --- a/python-h2.spec +++ b/python-h2.spec @@ -1,11 +1,11 @@ Name: python-h2 -Version: 4.1.0 -Release: 2 +Version: 4.2.0 +Release: 1 Summary: A HTTP/2 protocol stack for Python License: MIT -URL: https://python-hyper.org/projects/hyper-h2/en/v4.1.0/ -Source0: https://files.pythonhosted.org/packages/2a/32/fec683ddd10629ea4ea46d206752a95a2d8a48c22521edd70b142488efe1/h2-4.1.0.tar.gz -Patch0: Fix-repr-checks-for-Python-3.11.patch +URL: https://python-hyper.org/projects/hyper-h2/en/v4.2.0/ +Source0: https://files.pythonhosted.org/packages/1b/38/d7f80fd13e6582fb8e0df8c9a653dcc02b03ca34f4d72f34869298c5baf8/h2-4.2.0.tar.gz +#Patch0: Fix-repr-checks-for-Python-3.11.patch BuildArch: noarch BuildRequires: (python3dist(hpack) >= 4 with python3dist(hpack) < 5) @@ -47,7 +47,7 @@ The python-h2-help package contains related documents. rm -rf h2.egg-info %build -%py3_build +%pyproject_build PYTHONPATH=${PWD} sphinx-build-3 docs/source html rm -rf html/{.doctrees,.buildinfo} @@ -58,7 +58,7 @@ ln -s /usr/share/javascript/jquery/3.2.1/jquery.min.js html/_static/jquery.js ln -s /usr/share/javascript/jquery/3.2.1/jquery.js html/_static/jquery-3.2.1.js %install -%py3_install +%pyproject_install %check PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest @@ -66,12 +66,19 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest %files -n python3-h2 %doc README.rst LICENSE %{python3_sitelib}/h2 -%{python3_sitelib}/h2-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/h2-%{version}.dist-info/* %files help %doc html LICENSE %changelog +* Wed Aug 13 2025 dongqi - 4.2.0-1 +- Update package version to 4.2.0 +- modify spec pyproject_build +- add typing information +- Remove mistakenly set `max_inbound_frame_size` attribute on `H2Stream`. +- Fix repr() checks for Python 3.11 + * Sun Jul 23 2023 wangkai <13474090681@163.com> - 4.1.0-2 - Fix repr checks for Python 3.11