summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-05-15 10:35:41 +0200
committerMichał Górny <mgorny@gentoo.org>2022-05-15 10:43:26 +0200
commit8f041477bdd17213149e32f81ae2e9e4f1f1f4e2 (patch)
tree1a40a2ade4eef422cc4545db41b161fb01fee9ea /dev-python/websockets
parentdev-python/editables: Stabilize 0.3 ppc, #844823 (diff)
downloadgentoo-8f041477bdd17213149e32f81ae2e9e4f1f1f4e2.tar.gz
gentoo-8f041477bdd17213149e32f81ae2e9e4f1f1f4e2.tar.bz2
gentoo-8f041477bdd17213149e32f81ae2e9e4f1f1f4e2.zip
dev-python/websockets: Enable py3.11
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/websockets')
-rw-r--r--dev-python/websockets/files/websockets-10.3-py311.patch24
-rw-r--r--dev-python/websockets/websockets-10.3.ebuild6
2 files changed, 29 insertions, 1 deletions
diff --git a/dev-python/websockets/files/websockets-10.3-py311.patch b/dev-python/websockets/files/websockets-10.3-py311.patch
new file mode 100644
index 000000000000..d15eb2d32f81
--- /dev/null
+++ b/dev-python/websockets/files/websockets-10.3-py311.patch
@@ -0,0 +1,24 @@
+diff --git a/tests/legacy/test_client_server.py b/tests/legacy/test_client_server.py
+index f9de70c..05070c8 100644
+--- a/tests/legacy/test_client_server.py
++++ b/tests/legacy/test_client_server.py
+@@ -426,6 +426,10 @@ class CommonClientServerTests:
+ self.used_for_read = True
+ return super().recv(*args, **kwargs)
+
++ def recv_into(self, *args, **kwargs):
++ self.used_for_read = True
++ return super().recv_into(*args, **kwargs)
++
+ def send(self, *args, **kwargs):
+ self.used_for_write = True
+ return super().send(*args, **kwargs)
+@@ -1299,6 +1303,8 @@ class ClientServerOriginTests(ClientServerTestsMixin, AsyncioTestCase):
+ self.assertEqual(self.loop.run_until_complete(self.client.recv()), "Hello!")
+
+
++@unittest.skipIf(sys.version_info[:2] >= (3, 11),
++ "asyncio.coroutine has been removed in Python 3.11")
+ class YieldFromTests(ClientServerTestsMixin, AsyncioTestCase):
+ @with_server()
+ def test_client(self):
diff --git a/dev-python/websockets/websockets-10.3.ebuild b/dev-python/websockets/websockets-10.3.ebuild
index 8ae85335baa3..ab47cfe892ef 100644
--- a/dev-python/websockets/websockets-10.3.ebuild
+++ b/dev-python/websockets/websockets-10.3.ebuild
@@ -4,7 +4,7 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( pypy3 python3_{8..10} )
+PYTHON_COMPAT=( pypy3 python3_{8..11} )
inherit distutils-r1
@@ -25,6 +25,10 @@ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~
distutils_enable_tests pytest
+PATCHES=(
+ "${FILESDIR}/${P}-py311.patch"
+)
+
python_test() {
local EPYTEST_DESELECT=(
# very fragile to speed