mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/websockets: Enable py3.11
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
24
dev-python/websockets/files/websockets-10.3-py311.patch
Normal file
24
dev-python/websockets/files/websockets-10.3-py311.patch
Normal file
@@ -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):
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user