summaryrefslogtreecommitdiff
path: root/dev-python/h2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-27 21:13:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-27 21:13:07 +0100
commit58363a659e5161822c630bb4e16459a3a838696c (patch)
treee5acafcf61378ef38d817a7989e659cdaffadf4c /dev-python/h2
parent246c83e768dd1efb42047de864a1e92b73de8b5c (diff)
gentoo auto-resync : 27:05:2023 - 21:13:06
Diffstat (limited to 'dev-python/h2')
-rw-r--r--dev-python/h2/Manifest5
-rw-r--r--dev-python/h2/files/h2-4.1.0-python3.11-tests.patch104
-rw-r--r--dev-python/h2/h2-4.1.0-r1.ebuild6
-rw-r--r--dev-python/h2/metadata.xml1
4 files changed, 113 insertions, 3 deletions
diff --git a/dev-python/h2/Manifest b/dev-python/h2/Manifest
index 0e8ef8867c70..70c3399cde38 100644
--- a/dev-python/h2/Manifest
+++ b/dev-python/h2/Manifest
@@ -1,3 +1,4 @@
+AUX h2-4.1.0-python3.11-tests.patch 3883 BLAKE2B 34dc1a9491af3a99b1df712664cb7eac39a18310178376f959f98fb5b55dfc34811cd2ea6468550093857a562f3a8450ee86ec84cfe805d56b46852f4bcd17c1 SHA512 b9c03e35020641e5ae37eb6a6f444c8dca76617e8ac8872b2ad34bd6ddfe7890ee7c485df5cd94215be1018b7b1fda32118e9d5a5ed469fabf8fe621f675103e
DIST h2-4.1.0.tar.gz 2143812 BLAKE2B b9d9a771340b4bde1675b9fd65c242732a1a262456f84a409662cf2b57326e24e0583160ba0531c0b105b79342578714127dddb560d2a27de58af34d1052c698 SHA512 4e9cf88b3ae702a8a42bded775ad337809787fe8172d501c230d55abbf1edd764acf3b227f2e58756d882499661ffcf6bbdd4812a4d938c04fac3f1aa2390b28
-EBUILD h2-4.1.0-r1.ebuild 1293 BLAKE2B 82c48cb9ac61fc7e9e2994f301b54ebd495a617304cb0837fcb43730ed6efe915bb5239afa4c4c7e4fd8e2fbf35e9e6c24dfa56753fdde4c6016974e9fdd22e3 SHA512 92cfb22eaad826e2cdedf6c6ee2664d4adced713025423f17af8a07d7a8f76f3283207168f33530aa2c48fc41bd2bf867cefd3167ba2160c5400aa6089006857
-MISC metadata.xml 694 BLAKE2B 8e3c231ed6263fd0feba3f8f3ef0d5cf0345e2de092e4a50de3d6b9dc3b009570b896dc5a7804f9b99e9ffd75ae6a8387d139f0db1dc3ce213c4e7bca63061e2 SHA512 713b15d6f84180c861d1487f2ee7a377acd9403876385e064bfb103b5961cc53655953602dfc809cef648444ea9e201991e2de00203d0ab5a36c3d13b1764e2a
+EBUILD h2-4.1.0-r1.ebuild 1350 BLAKE2B 0d1d862ee9633516ba588ef5684c1ccce45e1b0eb2c2c8ccb8497fe7ea8111ffc4aaa23e40ba84a019d9a56c1507cc004fd590190e9d83583325c931043fb004 SHA512 a7e7e3afcc7941981eaf826b69a991a3abebb64bbd83709a163abe8221b96cc7e1ac4d035f614b7a95b208e2834b5d0ec542565ccfd9fc3577cbcb4f3aea1c7d
+MISC metadata.xml 749 BLAKE2B 56c11f66a8328e3cee57d2636d05fa9804be171e8790cb316799ee8bd84e00e2377b8a9ba913544a13fc89cd7e3120e0c58d3580be1156bd1af5e0d73d3fc89f SHA512 ab91ee344efed7c64fa87c427123758d8b872aa4bea5661c8fde7a94ff4b197d49a1b1133d4c7fce0d9165a09e299ad238f51cebe7439a80ad2bd5ca82edd540
diff --git a/dev-python/h2/files/h2-4.1.0-python3.11-tests.patch b/dev-python/h2/files/h2-4.1.0-python3.11-tests.patch
new file mode 100644
index 000000000000..c444e6a5007a
--- /dev/null
+++ b/dev-python/h2/files/h2-4.1.0-python3.11-tests.patch
@@ -0,0 +1,104 @@
+https://github.com/python-hyper/h2/commit/eabe727282e7a7aa3254773292f86cf341bdc597
+
+From eabe727282e7a7aa3254773292f86cf341bdc597 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
+--- 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):
+ """
+
diff --git a/dev-python/h2/h2-4.1.0-r1.ebuild b/dev-python/h2/h2-4.1.0-r1.ebuild
index f04351c78eca..7dee9b75abc0 100644
--- a/dev-python/h2/h2-4.1.0-r1.ebuild
+++ b/dev-python/h2/h2-4.1.0-r1.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} pypy3 )
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
inherit distutils-r1
@@ -32,6 +32,10 @@ BDEPEND="
)
"
+PATCHES=(
+ "${FILESDIR}"/${P}-python3.11-tests.patch
+)
+
distutils_enable_tests pytest
python_test() {
diff --git a/dev-python/h2/metadata.xml b/dev-python/h2/metadata.xml
index 37d794cfe83c..0900e446d425 100644
--- a/dev-python/h2/metadata.xml
+++ b/dev-python/h2/metadata.xml
@@ -12,6 +12,7 @@
<name>Cory Benfield</name>
</maintainer>
<remote-id type="pypi">h2</remote-id>
+ <remote-id type="github">python-hyper/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