summaryrefslogtreecommitdiff
path: root/dev-python/h2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
commite23a08d0c97a0cc415aaa165da840b056f93c997 (patch)
tree4c5f7db60483518201fef36f8cc0712789a08db2 /dev-python/h2
parent391b5b359a346aff490103da7dddc85047f83830 (diff)
gentoo resync : 08.10.2021
Diffstat (limited to 'dev-python/h2')
-rw-r--r--dev-python/h2/Manifest8
-rw-r--r--dev-python/h2/files/hyper-h2-3.2.0-failed-healthcheck.patch74
-rw-r--r--dev-python/h2/h2-3.2.0.ebuild52
-rw-r--r--dev-python/h2/h2-4.0.0.ebuild52
-rw-r--r--dev-python/h2/h2-4.1.0.ebuild29
-rw-r--r--dev-python/h2/metadata.xml21
6 files changed, 236 insertions, 0 deletions
diff --git a/dev-python/h2/Manifest b/dev-python/h2/Manifest
new file mode 100644
index 000000000000..ddf9b37abf93
--- /dev/null
+++ b/dev-python/h2/Manifest
@@ -0,0 +1,8 @@
+AUX hyper-h2-3.2.0-failed-healthcheck.patch 3381 BLAKE2B 0eef97897e58ca0b580371e1cd8dfeb4c85d3e333aea4566121bbabd08cee5a46070360e3f40f244058082c5949f3fc1ed8c5a9d80bdc6f9c7ce741a9dfa915f SHA512 0e5e9a6f3380e3a2b54f63c9894e3fd5c5987b7e55834200b051e6d8ed13219f9784340275ff136ba273eb5b989b5bed80e85460bc7b25049974150f0340911e
+DIST h2-4.1.0.tar.gz 2143812 BLAKE2B b9d9a771340b4bde1675b9fd65c242732a1a262456f84a409662cf2b57326e24e0583160ba0531c0b105b79342578714127dddb560d2a27de58af34d1052c698 SHA512 4e9cf88b3ae702a8a42bded775ad337809787fe8172d501c230d55abbf1edd764acf3b227f2e58756d882499661ffcf6bbdd4812a4d938c04fac3f1aa2390b28
+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 h2-3.2.0.ebuild 1579 BLAKE2B 7b3de7a68a59e1bb7399b61a1e5163b50e1948e4c3385a0264e6fb1083d5c933e6a8832c26b9cfe0452a852de7cb488ccb1bc85d1916692843ce7d84bab0e850 SHA512 8c2ec8963172a42596c4881806e5b9173bf223666d4efcf0b81342bc66c0d6c382747e62284557805e236971f5392a3693a301ad208cbb60fb5786e9dbb52788
+EBUILD h2-4.0.0.ebuild 1539 BLAKE2B c2dd2ff2704e80b8a0e023af334d012b2f047d5582a494ce6703570bea5cb972973afb4e20f26af114980840e58ee42b306d3403c92b397524d699239d6c4d04 SHA512 56cd91ac6565f022aa69cba77b1b33d01ef55e7bc100ec1c9d40673c99acee6a30ebf92506c626763aad795738010870c37e37f5a09339f94a391fd2a69ea9bb
+EBUILD h2-4.1.0.ebuild 796 BLAKE2B 0dfb4db9d1c3a99fbd91a81dc3bbbb937d57e6f20ddf1b34a109f26facfe67318080ebe8a58f72de045005224af14c55750465d40c81788931be0e82f050617b SHA512 38c4bbb22682709687c838fe88a86405b44025c9774b78ad1621254f80a67006b0b73aed8a3a3b331b68d1d6feb01d1b1ebc4f9583cd4ed8203fa58a96f1958f
+MISC metadata.xml 694 BLAKE2B 8e3c231ed6263fd0feba3f8f3ef0d5cf0345e2de092e4a50de3d6b9dc3b009570b896dc5a7804f9b99e9ffd75ae6a8387d139f0db1dc3ce213c4e7bca63061e2 SHA512 713b15d6f84180c861d1487f2ee7a377acd9403876385e064bfb103b5961cc53655953602dfc809cef648444ea9e201991e2de00203d0ab5a36c3d13b1764e2a
diff --git a/dev-python/h2/files/hyper-h2-3.2.0-failed-healthcheck.patch b/dev-python/h2/files/hyper-h2-3.2.0-failed-healthcheck.patch
new file mode 100644
index 000000000000..04adc2748c21
--- /dev/null
+++ b/dev-python/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/h2/h2-3.2.0.ebuild b/dev-python/h2/h2-3.2.0.ebuild
new file mode 100644
index 000000000000..830e6c2dc91c
--- /dev/null
+++ b/dev-python/h2/h2-3.2.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1
+
+MY_P=hyper-h2-${PV}
+DESCRIPTION="HTTP/2 State-Machine based protocol implementation"
+HOMEPAGE="https://python-hyper.org/h2/en/stable/ https://pypi.org/project/h2/"
+SRC_URI="https://github.com/python-hyper/${PN}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+
+RDEPEND="
+ >=dev-python/hyperframe-5.2.0[${PYTHON_USEDEP}]
+ <dev-python/hyperframe-6.0.0[${PYTHON_USEDEP}]
+ >=dev-python/hpack-3.0.0[${PYTHON_USEDEP}]
+ <dev-python/hpack-4.0.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ # From https://github.com/python-hyper/h2/pull/1248
+ # Disables some failing healthchecks
+ "${FILESDIR}/hyper-h2-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 --hypothesis-profile=travis ${deselect[@]/#/--deselect }
+}
diff --git a/dev-python/h2/h2-4.0.0.ebuild b/dev-python/h2/h2-4.0.0.ebuild
new file mode 100644
index 000000000000..410e17cd3adb
--- /dev/null
+++ b/dev-python/h2/h2-4.0.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1
+
+MY_P=hyper-h2-${PV}
+DESCRIPTION="HTTP/2 State-Machine based protocol implementation"
+HOMEPAGE="https://python-hyper.org/h2/en/stable/ https://pypi.org/project/h2/"
+SRC_URI="https://github.com/python-hyper/${PN}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
+
+RDEPEND="
+ >=dev-python/hyperframe-6.0[${PYTHON_USEDEP}]
+ <dev-python/hyperframe-7[${PYTHON_USEDEP}]
+ >=dev-python/hpack-4.0[${PYTHON_USEDEP}]
+ <dev-python/hpack-5[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ # From https://github.com/python-hyper/h2/pull/1248
+ # Disables some failing healthchecks
+ "${FILESDIR}/hyper-h2-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 }
+}
diff --git a/dev-python/h2/h2-4.1.0.ebuild b/dev-python/h2/h2-4.1.0.ebuild
new file mode 100644
index 000000000000..1cfe581ac95d
--- /dev/null
+++ b/dev-python/h2/h2-4.1.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1
+
+DESCRIPTION="HTTP/2 State-Machine based protocol implementation"
+HOMEPAGE="https://python-hyper.org/h2/en/stable/ https://pypi.org/project/h2/"
+SRC_URI="https://github.com/python-hyper/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="
+ >=dev-python/hyperframe-6.0[${PYTHON_USEDEP}]
+ <dev-python/hyperframe-7[${PYTHON_USEDEP}]
+ >=dev-python/hpack-4.0[${PYTHON_USEDEP}]
+ <dev-python/hpack-5[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
diff --git a/dev-python/h2/metadata.xml b/dev-python/h2/metadata.xml
new file mode 100644
index 000000000000..37d794cfe83c
--- /dev/null
+++ b/dev-python/h2/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <upstream>
+ <maintainer>
+ <email>cory@lukasa.co.uk</email>
+ <name>Cory Benfield</name>
+ </maintainer>
+ <remote-id type="pypi">h2</remote-id>
+ </upstream>
+ <longdescription>A 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.
+ </longdescription>
+</pkgmetadata>