From 407c950bbfad43abb4553c0211dce8dda309723a Mon Sep 17 00:00:00 2001 From: Ekaterina Vaartis Date: Sun, 16 May 2021 12:27:13 +0300 Subject: [PATCH] dev-python/hyper-h2: Bump to python 3.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ekaterina Vaartis Signed-off-by: Michał Górny --- .../hyper-h2-3.2.0-failed-healthcheck.patch | 74 +++++++++++++++++++ dev-python/hyper-h2/hyper-h2-3.2.0.ebuild | 29 ++++++-- dev-python/hyper-h2/hyper-h2-4.0.0.ebuild | 23 +++++- 3 files changed, 118 insertions(+), 8 deletions(-) create mode 100644 dev-python/hyper-h2/files/hyper-h2-3.2.0-failed-healthcheck.patch diff --git a/dev-python/hyper-h2/files/hyper-h2-3.2.0-failed-healthcheck.patch b/dev-python/hyper-h2/files/hyper-h2-3.2.0-failed-healthcheck.patch new file mode 100644 index 0000000000000..04adc2748c211 --- /dev/null +++ b/dev-python/hyper-h2/files/hyper-h2-3.2.0-failed-healthcheck.patch @@ -0,0 +1,74 @@ +diff --git a/test/test_basic_logic.py b/test/test_basic_logic.py +index fb54fe50..8c8f3b7d 100644 +--- a/test/test_basic_logic.py ++++ b/test/test_basic_logic.py +@@ -21,7 +21,7 @@ + + from . import helpers + +-from hypothesis import given ++from hypothesis import given, settings, HealthCheck + from hypothesis.strategies import integers + + +@@ -790,6 +790,7 @@ def test_headers_are_lowercase(self, frame_factory): + assert c.data_to_send() == expected_frame.serialize() + + @given(frame_size=integers(min_value=2**14, max_value=(2**24 - 1))) ++ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture]) + def test_changing_max_frame_size(self, frame_factory, frame_size): + """ + When the user changes the max frame size and the change is ACKed, the +diff --git a/test/test_flow_control_window.py b/test/test_flow_control_window.py +index 24b345aa..7a445af1 100644 +--- a/test/test_flow_control_window.py ++++ b/test/test_flow_control_window.py +@@ -7,7 +7,7 @@ + """ + import pytest + +-from hypothesis import given ++from hypothesis import given, settings, HealthCheck + from hypothesis.strategies import integers + + import h2.config +@@ -715,6 +715,7 @@ def _setup_connection_and_send_headers(self, frame_factory): + return c + + @given(stream_id=integers(max_value=0)) ++ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture]) + def test_must_acknowledge_for_stream(self, frame_factory, stream_id): + """ + Flow control acknowledgements must be done on a stream ID that is +@@ -740,6 +741,7 @@ def test_must_acknowledge_for_stream(self, frame_factory, stream_id): + ) + + @given(size=integers(max_value=-1)) ++ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture]) + def test_cannot_acknowledge_less_than_zero(self, frame_factory, size): + """ + The user must acknowledge at least 0 bytes. +@@ -837,6 +839,7 @@ def test_acknowledging_streams_we_never_saw(self, frame_factory): + c.acknowledge_received_data(2048, stream_id=101) + + @given(integers(min_value=1025, max_value=DEFAULT_FLOW_WINDOW)) ++ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture]) + def test_acknowledging_1024_bytes_when_empty_increments(self, + frame_factory, + increment): +@@ -873,6 +876,7 @@ def test_acknowledging_1024_bytes_when_empty_increments(self, + # This test needs to use a lower cap, because otherwise the algo will + # increment the stream window anyway. + @given(integers(min_value=1025, max_value=(DEFAULT_FLOW_WINDOW // 4) - 1)) ++ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture]) + def test_connection_only_empty(self, frame_factory, increment): + """ + If the connection flow control window is empty, but the stream flow +@@ -916,5 +920,6 @@ def test_connection_only_empty(self, frame_factory, increment): + assert c.data_to_send() == expected_data + + @given(integers(min_value=1025, max_value=DEFAULT_FLOW_WINDOW)) ++ @settings(suppress_health_check=[HealthCheck.function_scoped_fixture]) + def test_mixing_update_forms(self, frame_factory, increment): + """ + If the user mixes ackowledging data with manually incrementing windows, diff --git a/dev-python/hyper-h2/hyper-h2-3.2.0.ebuild b/dev-python/hyper-h2/hyper-h2-3.2.0.ebuild index 50176089cdd71..819953993d971 100644 --- a/dev-python/hyper-h2/hyper-h2-3.2.0.ebuild +++ b/dev-python/hyper-h2/hyper-h2-3.2.0.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{7,8,9} ) +PYTHON_COMPAT=( python3_{7..10} ) inherit distutils-r1 @@ -13,8 +13,6 @@ SRC_URI="https://github.com/python-hyper/${PN}/archive/v${PV}.tar.gz -> ${P}.tar LICENSE="MIT" SLOT="0" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="test" -RESTRICT="!test? ( test )" RDEPEND=" >=dev-python/hyperframe-5.2.0[${PYTHON_USEDEP}] @@ -22,14 +20,31 @@ RDEPEND=" >=dev-python/hpack-3.0.0[${PYTHON_USEDEP}]