Sync from SUSE:ALP:Source:Standard:1.0 python-h2 revision 4ef674dda2d90d5f67402c0180ff27e9
This commit is contained in:
commit
3b6655ed5c
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
107
fix-repr-checks-for-py311.patch
Normal file
107
fix-repr-checks-for-py311.patch
Normal file
@ -0,0 +1,107 @@
|
||||
From 8952c91606cd014720ccf202a25b5ee1fbed1591 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
|
||||
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
|
||||
---
|
||||
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) == (
|
||||
- "<RemoteSettingsChanged changed_settings:{ChangedSetting("
|
||||
- "setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
|
||||
- "new_value=32768)}>"
|
||||
- )
|
||||
+ if sys.version_info >= (3, 11):
|
||||
+ assert repr(e) == (
|
||||
+ "<RemoteSettingsChanged changed_settings:{ChangedSetting("
|
||||
+ "setting=4, original_value=65536, "
|
||||
+ "new_value=32768)}>"
|
||||
+ )
|
||||
+ else:
|
||||
+ assert repr(e) == (
|
||||
+ "<RemoteSettingsChanged changed_settings:{ChangedSetting("
|
||||
+ "setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
|
||||
+ "new_value=32768)}>"
|
||||
+ )
|
||||
|
||||
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) == (
|
||||
- "<StreamReset stream_id:919, "
|
||||
- "error_code:ErrorCodes.ENHANCE_YOUR_CALM, remote_reset:False>"
|
||||
- )
|
||||
+ if sys.version_info >= (3, 11):
|
||||
+ assert repr(e) == (
|
||||
+ "<StreamReset stream_id:919, "
|
||||
+ "error_code:11, remote_reset:False>"
|
||||
+ )
|
||||
+ else:
|
||||
+ assert repr(e) == (
|
||||
+ "<StreamReset stream_id:919, "
|
||||
+ "error_code:ErrorCodes.ENHANCE_YOUR_CALM, remote_reset:False>"
|
||||
+ )
|
||||
|
||||
def test_pushedstreamreceived_repr(self):
|
||||
"""
|
||||
@@ -284,11 +297,18 @@ def test_settingsacknowledged_repr(self):
|
||||
),
|
||||
}
|
||||
|
||||
- assert repr(e) == (
|
||||
- "<SettingsAcknowledged changed_settings:{ChangedSetting("
|
||||
- "setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
|
||||
- "new_value=32768)}>"
|
||||
- )
|
||||
+ if sys.version_info >= (3, 11):
|
||||
+ assert repr(e) == (
|
||||
+ "<SettingsAcknowledged changed_settings:{ChangedSetting("
|
||||
+ "setting=4, original_value=65536, "
|
||||
+ "new_value=32768)}>"
|
||||
+ )
|
||||
+ else:
|
||||
+ assert repr(e) == (
|
||||
+ "<SettingsAcknowledged changed_settings:{ChangedSetting("
|
||||
+ "setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
|
||||
+ "new_value=32768)}>"
|
||||
+ )
|
||||
|
||||
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) == (
|
||||
- "<ConnectionTerminated error_code:ErrorCodes.INADEQUATE_SECURITY, "
|
||||
- "last_stream_id:33, additional_data:%s>" % data_repr
|
||||
- )
|
||||
+ if sys.version_info >= (3, 11):
|
||||
+ assert repr(e) == (
|
||||
+ "<ConnectionTerminated error_code:12, "
|
||||
+ "last_stream_id:33, additional_data:%s>" % data_repr
|
||||
+ )
|
||||
+ else:
|
||||
+ assert repr(e) == (
|
||||
+ "<ConnectionTerminated error_code:ErrorCodes.INADEQUATE_SECURITY, "
|
||||
+ "last_stream_id:33, additional_data:%s>" % data_repr
|
||||
+ )
|
||||
|
||||
def test_alternativeserviceavailable_repr(self):
|
||||
"""
|
BIN
h2-4.1.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
h2-4.1.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
150
python-h2.changes
Normal file
150
python-h2.changes
Normal file
@ -0,0 +1,150 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 21 12:26:00 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add sle15_python_module_pythons (jsc#PED-68)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 13 22:41:43 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Make calling of %{sle15modernpython} optional.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 19 10:42:29 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add fix-repr-checks-for-py311.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 6 14:23:47 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 4.1.0
|
||||
* Support for Python 3.9 has been added.
|
||||
* Support for Python 3.10 has been added.
|
||||
* New example for a Python socket HTTP/2 client.
|
||||
* New `OutputLogger` for use with ``h2.config.logger``. This is
|
||||
only provided for convenience and not part of the stable API.
|
||||
* Header validation now rejects empty header names with a
|
||||
ProtocolError. While hpack decodes such header blocks without
|
||||
issues, they violate the HTTP semantics.
|
||||
* Fix TE header name in error message.
|
||||
- Drop h2-pr1248-disable-hypothesis-healthcheck.patch merged
|
||||
upstream
|
||||
- Register hypothesis profile for slow obs executions.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 29 19:50:36 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Add h2-pr1248-disable-hypothesis-healthcheck.patch to disable
|
||||
hypthesis health check failures. Thanks to the Fedora maintainer.
|
||||
gh#python-hyper/h2#1248
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 21 17:07:56 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Drop hyperframe.patch no longer needed
|
||||
- Skip flaky tests test_connection_only_empty & test_delegated_eq
|
||||
that hypothesis is failing on s390x
|
||||
- Update to v4.0.0
|
||||
* Support for Python 2.7-3.5 has been dropped
|
||||
* Support for Python 3.8 has been added.
|
||||
* Receiving DATA before HEADERS now raises a ProtocolError
|
||||
(see https://tools.ietf.org/html/rfc7540#section-8.1)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 15 13:10:43 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- Add hyperframe.patch to fix build with hyperframe 6
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 14 08:37:11 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Fix build without python2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 27 05:43:42 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 3.2.0:
|
||||
* Receiving DATA frames on closed (or reset) streams now properly emit a
|
||||
WINDOW_UPDATE to keep the connection flow window topped up.
|
||||
* h2.config.logger now uses a trace(...) function, in addition to
|
||||
debug(...).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 4 09:27:07 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Skip one test that is flaky
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 14 06:57:45 UTC 2019 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Drop unused dependancies on pytest-cov and pytest-xdist.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 12 10:04:22 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 3.1.1:
|
||||
* Ignore WINDOW_UPDATE and RST_STREAM frames received after stream closure.
|
||||
- Drop patch pytest5.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 26 10:02:54 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Add patch to fix building with pytest5 pytest5.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 26 09:58:17 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Skip flaky test in OBS:
|
||||
* test_changing_max_frame_size
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 19 08:59:56 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Use pytest4 for now, link upstream ticket
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 14 19:21:59 UTC 2019 - Drew Balliet <aballiet@suse.com>
|
||||
|
||||
- Updated testing line to current standard
|
||||
- Removed symlink in install line
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 28 04:06:48 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Set URL to more useful https://github.com/python-hyper/hyper-h2
|
||||
- Update to v3.1.0
|
||||
* API Changes (Backward-Incompatible)
|
||||
+ h2.connection.H2Connection.data_to_send first and only
|
||||
argument ``amt`` was renamed to ``amount``
|
||||
+ Support for Python 3.3 has been removed.
|
||||
* API Changes (Backward-Compatible)
|
||||
+ h2.connection.H2Connection.send_data now supports ``data``
|
||||
parameter being a ``memoryview`` object.
|
||||
+ Refactor ping-related events: a h2.events.PingReceived event is
|
||||
fired when a PING frame is received and a h2.events.PingAckReceived
|
||||
event is fired when a PING frame with an ACK flag is received
|
||||
+ h2.events.PingAcknowledged is deprecated in favour of the
|
||||
identical h2.events.PingAckReceived
|
||||
+ Added ENABLE_CONNECT_PROTOCOL to h2.settings.SettingCodes
|
||||
+ Support CONNECT requests with a ``:protocol`` pseudo header
|
||||
thereby supporting RFC 8441.
|
||||
+ A limit to the number of closed streams kept in memory by the
|
||||
connection is applied. It can be configured by
|
||||
h2.connection.H2Connection.MAX_CLOSED_STREAMS
|
||||
* Debug logging when stream_id is None is now fixed and no longer errors.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 4 12:49:07 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Remove superfluous devel dependency for noarch package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 21 19:25:18 UTC 2017 - aloisio@gmx.com
|
||||
|
||||
- Update to version 3.0.1 (see HISTORY.rst)
|
||||
- Converted to single-spec
|
||||
- Enabled tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 27 14:34:57 UTC 2016 - aloisio@gmx.com
|
||||
|
||||
- Initial package (2.5.1)
|
77
python-h2.spec
Normal file
77
python-h2.spec
Normal file
@ -0,0 +1,77 @@
|
||||
#
|
||||
# spec file for package python-h2
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python3-%{**}}
|
||||
%define skip_python2 1
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-h2
|
||||
Version: 4.1.0
|
||||
Release: 0
|
||||
Summary: HTTP/2 State-Machine based protocol implementation
|
||||
License: MIT
|
||||
URL: https://github.com/python-hyper/hyper-h2
|
||||
Source0: https://files.pythonhosted.org/packages/source/h/h2/h2-%{version}.tar.gz
|
||||
# Taken from https://github.com/python-hyper/h2/pull/1274
|
||||
Patch1: fix-repr-checks-for-py311.patch
|
||||
BuildRequires: %{python_module hpack >= 2.3}
|
||||
BuildRequires: %{python_module hyperframe >= 6.0}
|
||||
BuildRequires: %{python_module hypothesis >= 5.49}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-hpack >= 2.3
|
||||
Requires: python-hyperframe >= 6.0
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Pure-Python implementation of a HTTP/2 protocol stack.
|
||||
It's written from the ground up to be embeddable in whatever program
|
||||
you choose to use, ensuring that you can speak HTTP/2 regardless of
|
||||
your programming paradigm.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n h2-%{version}
|
||||
|
||||
echo "
|
||||
# increase test deadline for slow obs executions
|
||||
import hypothesis
|
||||
hypothesis.settings.register_profile(
|
||||
'obs',
|
||||
deadline=5000,
|
||||
suppress_health_check=[hypothesis.HealthCheck.too_slow]
|
||||
)
|
||||
" >> test/conftest.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest --hypothesis-profile=obs
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc CHANGELOG.rst README.rst
|
||||
%{python_sitelib}/h2
|
||||
%{python_sitelib}/h2-%{version}*-info
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user