diff options
Diffstat (limited to 'dev-python/hyper-h2')
-rw-r--r-- | dev-python/hyper-h2/Manifest | 5 | ||||
-rw-r--r-- | dev-python/hyper-h2/files/hyper-h2-3.2.0-failed-healthcheck.patch | 74 | ||||
-rw-r--r-- | dev-python/hyper-h2/hyper-h2-3.2.0.ebuild | 29 | ||||
-rw-r--r-- | dev-python/hyper-h2/hyper-h2-4.0.0.ebuild | 23 |
4 files changed, 121 insertions, 10 deletions
diff --git a/dev-python/hyper-h2/Manifest b/dev-python/hyper-h2/Manifest index 2024f73ea12b..eb4a07cb7297 100644 --- a/dev-python/hyper-h2/Manifest +++ b/dev-python/hyper-h2/Manifest @@ -1,5 +1,6 @@ +AUX hyper-h2-3.2.0-failed-healthcheck.patch 3381 BLAKE2B 0eef97897e58ca0b580371e1cd8dfeb4c85d3e333aea4566121bbabd08cee5a46070360e3f40f244058082c5949f3fc1ed8c5a9d80bdc6f9c7ce741a9dfa915f SHA512 0e5e9a6f3380e3a2b54f63c9894e3fd5c5987b7e55834200b051e6d8ed13219f9784340275ff136ba273eb5b989b5bed80e85460bc7b25049974150f0340911e DIST hyper-h2-3.2.0.tar.gz 2203333 BLAKE2B 245bab162852070e850613c41162c75efe5e43535945dacf448afdc948cade83402f77259aa46f375d0772a5287e42d8842b1259cb36392cc8fc222dec7cef75 SHA512 103a4ea2cd29037ce03ae676864125b4111c7d31a82bbbe7028557da886d88fb5363d885f08d5d3f68dfa29013b7b03350cc0cb4d9dddf32735e98dae5d7fc7c DIST hyper-h2-4.0.0.tar.gz 2142185 BLAKE2B e5ae692c1f21b6e3ea8695ec269a4d02f72b8d385b6f9c523775f3db2200379f9af5accb70fa06a357575728a6a5b2644dd1225cfdf458fffa80e84c7b1c7b2f SHA512 84578174a13782897f9286c62d450eaf11aa71c01c96b8660179cd2df77618dc1a6c4b354b2bc5731cd21c4709c8c0a8282a859a98c4a62a7295b6dfd1b5cfb2 -EBUILD hyper-h2-3.2.0.ebuild 957 BLAKE2B 35500d93c0d2dd87135e0838c666456b1c47bacf79a96de3ae7953b80535f5c451b055a1aaeeca2e7e3793bf82fe96c5572252bdfeafe1833a61e065da6bca13 SHA512 23c1cea8d9b2a2331f31932af3575b9f4e8d3d540010070417545b27bc9733419d1400816dc120de17849a5d93c675db1878a50300f33f586d02b335e01f8cf7 -EBUILD hyper-h2-4.0.0.ebuild 788 BLAKE2B 4861e4b8334edc67c363c8a5f95c5fe172074c1f70b77d794709bd7745ffde759590a5bd7e2e69db865500a5007f52164d988f9d3242ad431071ada8f9218a4c SHA512 7c456e47aa45546715f5fec08d019f06077acd7000b53a233766e20c6b259b033ebb998016efa8595976eab8dd7021ddacd25751e45f2a3f08bc24a4baad08ec +EBUILD hyper-h2-3.2.0.ebuild 1525 BLAKE2B b84bf5d10d75fba77829b49066e0f6086bd2793afeedaec1cbc6da8a408f28c46106ff26a96c91ec6f1c47d7d8698b308bd72fa5ab94e54445dff8a958339556 SHA512 09aeff21748797a137cee17cd49d8087e5c23d4dd99c545474da2e4ee97225964e4181ed0674db210d7e8a996d338826f36d260bfe30968f8776fa7863445b7e +EBUILD hyper-h2-4.0.0.ebuild 1492 BLAKE2B ddc3845d611093e9c192a46b61776bd23576f733bf6527a51b32f2e2b5633f84526759266c65c3797f86d1f90c46627d035be846713f8cf90450ffaaf2626920 SHA512 65797119e25ba069926f454cc96c8de1718d134b1bc68fefb7fe483ef65897e9195e81e62defb387242f737b780b934f197434a0ecc86b3463b2d63abeb5d921 MISC metadata.xml 693 BLAKE2B 40bdc58c6b6541754e1fb5d2b3a6fa4ffd234f84768061f7ac1c1183f2f944a72948ca54824488ed2f177d96f9a0a74dc990ff6e97e6b9dabc4602522c0d27a0 SHA512 3f083b3de6499dfc1dbe59c4aa201f7b159847cf72076e0a7a9f80b029f668dd668395c2219e01dc5035677b21e6cd60f3ccf646fbef6bf458e208a0d79cb94d 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 000000000000..04adc2748c21 --- /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 50176089cdd7..819953993d97 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}] <dev-python/hpack-4.0.0[${PYTHON_USEDEP}] " -DEPEND="${RDEPEND} +BDEPEND=" test? ( dev-python/hypothesis[${PYTHON_USEDEP}] - dev-python/pytest[${PYTHON_USEDEP}] ) " +distutils_enable_tests pytest + +PATCHES=( + # From https://github.com/python-hyper/h2/pull/1248 + # Disables some failing healthchecks + "${FILESDIR}/${P}-failed-healthcheck.patch" +) + python_test() { - pytest -vv --hypothesis-profile=travis test || - die "Tests fail with ${EPYTHON}" + local deselect=() + [[ ${EPYTHON} == python3.10 ]] && deselect+=( + # these rely on fixed string repr() and fail because enum repr + # changed in py3.10 + test/test_basic_logic.py::TestBasicServer::test_stream_repr + test/test_events.py::TestEventReprs::test_remotesettingschanged_repr + test/test_events.py::TestEventReprs::test_streamreset_repr + test/test_events.py::TestEventReprs::test_settingsacknowledged_repr + test/test_events.py::TestEventReprs::test_connectionterminated_repr + ) + + epytest --hypothesis-profile=travis ${deselect[@]/#/--deselect } } diff --git a/dev-python/hyper-h2/hyper-h2-4.0.0.ebuild b/dev-python/hyper-h2/hyper-h2-4.0.0.ebuild index 9698bdee39b8..a133fd58b9c7 100644 --- a/dev-python/hyper-h2/hyper-h2-4.0.0.ebuild +++ b/dev-python/hyper-h2/hyper-h2-4.0.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 @@ -27,3 +27,24 @@ BDEPEND=" " distutils_enable_tests pytest + +PATCHES=( + # From https://github.com/python-hyper/h2/pull/1248 + # Disables some failing healthchecks + "${FILESDIR}/${PN}-3.2.0-failed-healthcheck.patch" +) + +python_test() { + local deselect=() + [[ ${EPYTHON} == python3.10 ]] && deselect+=( + # these rely on fixed string repr() and fail because enum repr + # changed in py3.10 + test/test_basic_logic.py::TestBasicServer::test_stream_repr + test/test_events.py::TestEventReprs::test_remotesettingschanged_repr + test/test_events.py::TestEventReprs::test_streamreset_repr + test/test_events.py::TestEventReprs::test_settingsacknowledged_repr + test/test_events.py::TestEventReprs::test_connectionterminated_repr + ) + + epytest ${deselect[@]/#/--deselect } +} |