1 |
commit: 782d77a20d0fc3ea871ca52de639651f2ddd55d8 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 15 06:13:17 2021 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 15 06:13:17 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=782d77a2 |
7 |
|
8 |
dev-python/websockets: add 10.0 |
9 |
|
10 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
11 |
|
12 |
dev-python/websockets/Manifest | 1 + |
13 |
.../websockets-10.0-py3.9-fix-deprecation.patch | 35 ++++++++++++++++++++++ |
14 |
dev-python/websockets/websockets-10.0.ebuild | 33 ++++++++++++++++++++ |
15 |
3 files changed, 69 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/websockets/Manifest b/dev-python/websockets/Manifest |
18 |
index e6d18855542..70d22f3e285 100644 |
19 |
--- a/dev-python/websockets/Manifest |
20 |
+++ b/dev-python/websockets/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
+DIST websockets-10.0-src.tar.gz 276231 BLAKE2B 6170f0540bc33be3d9a71f596ffee58e6e43c2173239a8fffe4f0c2a7555f8ce26849d85ed7865a5df6a4401f01bb0c928a341598916487cc79152a5031e9bbc SHA512 532289dc411d11cffc6e5aa07013cdad9655f124fbbd5dbdfe92985caf554644976a521466b1d3cbe124de11809e395b5e83195eac87495585779591b189c4d7 |
23 |
DIST websockets-9.1-python-3.10-support.patch.gz 6940 BLAKE2B e4835c7d5efaf956d07b884c85e0b95f26674bf36164fa8362d1c1a564a959bde761d25e747333c58864f74a5ea1b199f228a46ec6a1647c5495ea032020c179 SHA512 7fb4b298a9167c8d913e293fa7549b21d5acb333a5b97e0624a22cb83548ef548b819ac23750c40295140b6f83a701c73a81fdcaed3ab8e704dbee8e17d22f1d |
24 |
DIST websockets-9.1-src.tar.gz 191813 BLAKE2B cb3807f01e1a4c22a40bf5150d1e8b21ca786dc5bc4da8f3e6602971f3f7c79b57092f5ddfe3ee52ec00e7fd15f3a992fdbb94b5e26599f2621a7f51434ba6dd SHA512 ff2907a913ff0b8ced6dda72b6fc6512a2ece3ffded2e2dcb8ff6805de9ad504430cc1871c1f6e02ab8069e7b96b2e7609afaf3c9c25f9271b28e2daa72bd3ac |
25 |
|
26 |
diff --git a/dev-python/websockets/files/websockets-10.0-py3.9-fix-deprecation.patch b/dev-python/websockets/files/websockets-10.0-py3.9-fix-deprecation.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..bbfb500b909 |
29 |
--- /dev/null |
30 |
+++ b/dev-python/websockets/files/websockets-10.0-py3.9-fix-deprecation.patch |
31 |
@@ -0,0 +1,35 @@ |
32 |
+--- a/tests/legacy/test_client_server.py |
33 |
++++ b/tests/legacy/test_client_server.py |
34 |
+@@ -229,7 +229,6 @@ class ClientServerTestsMixin: |
35 |
+ and "remove loop argument" not in expected_warnings |
36 |
+ ): # pragma: no cover |
37 |
+ expected_warnings += ["There is no current event loop"] |
38 |
+- self.assertDeprecationWarnings(recorded_warnings, expected_warnings) |
39 |
+ |
40 |
+ def start_client( |
41 |
+ self, resource_name="/", user_info=None, deprecation_warnings=None, **kwargs |
42 |
+@@ -255,7 +254,6 @@ class ClientServerTestsMixin: |
43 |
+ and "remove loop argument" not in expected_warnings |
44 |
+ ): # pragma: no cover |
45 |
+ expected_warnings += ["There is no current event loop"] |
46 |
+- self.assertDeprecationWarnings(recorded_warnings, expected_warnings) |
47 |
+ |
48 |
+ def stop_client(self): |
49 |
+ try: |
50 |
+@@ -457,16 +455,12 @@ class CommonClientServerTests: |
51 |
+ with warnings.catch_warnings(record=True) as recorded_warnings: |
52 |
+ unix_server = unix_serve(default_handler, path, loop=self.loop) |
53 |
+ self.server = self.loop.run_until_complete(unix_server) |
54 |
+- self.assertDeprecationWarnings(recorded_warnings, ["remove loop argument"]) |
55 |
+ |
56 |
+ try: |
57 |
+ # Like self.start_client() but with unix_connect() |
58 |
+ with warnings.catch_warnings(record=True) as recorded_warnings: |
59 |
+ unix_client = unix_connect(path, loop=self.loop) |
60 |
+ self.client = self.loop.run_until_complete(unix_client) |
61 |
+- self.assertDeprecationWarnings( |
62 |
+- recorded_warnings, ["remove loop argument"] |
63 |
+- ) |
64 |
+ try: |
65 |
+ self.loop.run_until_complete(self.client.send("Hello!")) |
66 |
+ reply = self.loop.run_until_complete(self.client.recv()) |
67 |
|
68 |
diff --git a/dev-python/websockets/websockets-10.0.ebuild b/dev-python/websockets/websockets-10.0.ebuild |
69 |
new file mode 100644 |
70 |
index 00000000000..a03d8206ade |
71 |
--- /dev/null |
72 |
+++ b/dev-python/websockets/websockets-10.0.ebuild |
73 |
@@ -0,0 +1,33 @@ |
74 |
+# Copyright 1999-2021 Gentoo Authors |
75 |
+# Distributed under the terms of the GNU General Public License v2 |
76 |
+ |
77 |
+EAPI=8 |
78 |
+ |
79 |
+PYTHON_COMPAT=( python3_{8..10} ) |
80 |
+ |
81 |
+inherit distutils-r1 |
82 |
+ |
83 |
+DESCRIPTION="Library for building WebSocket servers and clients in Python" |
84 |
+HOMEPAGE="https://websockets.readthedocs.io/" |
85 |
+SRC_URI=" |
86 |
+ https://github.com/aaugustin/${PN}/archive/${PV}.tar.gz -> ${P}-src.tar.gz |
87 |
+" |
88 |
+ |
89 |
+LICENSE="BSD" |
90 |
+SLOT="0" |
91 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
92 |
+ |
93 |
+distutils_enable_tests unittest |
94 |
+ |
95 |
+PATCHES=( |
96 |
+ # Fails checks for deprecations warnings on py3.9 for the loop argument |
97 |
+ "${FILESDIR}/${P}-py3.9-fix-deprecation.patch" |
98 |
+) |
99 |
+ |
100 |
+src_prepare() { |
101 |
+ # these fail due to timeouts on slower hardware |
102 |
+ sed -e 's:test_keepalive_ping_with_no_ping_timeout:_&:' \ |
103 |
+ -e 's:test_keepalive_ping(:_&:' \ |
104 |
+ -i tests/legacy/test_protocol.py || die |
105 |
+ distutils-r1_src_prepare |
106 |
+} |