1 |
commit: 0467886b731053bc339461912e0c4efe20dccf8f |
2 |
Author: Arthur Zamarin <arthurzam <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Jul 24 16:51:26 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 29 18:46:54 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0467886b |
7 |
|
8 |
dev-python/aiohttp: enable py3.10 |
9 |
|
10 |
patch taken from comment here: |
11 |
https://github.com/aio-libs/aiohttp/issues/5905 |
12 |
|
13 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gmail.com> |
14 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
15 |
|
16 |
dev-python/aiohttp/aiohttp-3.7.4-r1.ebuild | 3 +- |
17 |
.../aiohttp/files/aiohttp-3.7.4-fix-py3.10.patch | 73 ++++++++++++++++++++++ |
18 |
2 files changed, 75 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/dev-python/aiohttp/aiohttp-3.7.4-r1.ebuild b/dev-python/aiohttp/aiohttp-3.7.4-r1.ebuild |
21 |
index 3871075876e..4c0cea0a0d1 100644 |
22 |
--- a/dev-python/aiohttp/aiohttp-3.7.4-r1.ebuild |
23 |
+++ b/dev-python/aiohttp/aiohttp-3.7.4-r1.ebuild |
24 |
@@ -3,7 +3,7 @@ |
25 |
|
26 |
EAPI=7 |
27 |
|
28 |
-PYTHON_COMPAT=( python3_{8..9} ) |
29 |
+PYTHON_COMPAT=( python3_{8..10} ) |
30 |
|
31 |
inherit distutils-r1 multiprocessing |
32 |
|
33 |
@@ -42,6 +42,7 @@ BDEPEND=" |
34 |
|
35 |
PATCHES=( |
36 |
"${FILESDIR}"/aiohttp-3.7.4-brotli.patch |
37 |
+ "${FILESDIR}"/aiohttp-3.7.4-fix-py3.10.patch |
38 |
) |
39 |
|
40 |
DOCS=( CHANGES.rst CONTRIBUTORS.txt README.rst ) |
41 |
|
42 |
diff --git a/dev-python/aiohttp/files/aiohttp-3.7.4-fix-py3.10.patch b/dev-python/aiohttp/files/aiohttp-3.7.4-fix-py3.10.patch |
43 |
new file mode 100644 |
44 |
index 00000000000..3c7593584b7 |
45 |
--- /dev/null |
46 |
+++ b/dev-python/aiohttp/files/aiohttp-3.7.4-fix-py3.10.patch |
47 |
@@ -0,0 +1,73 @@ |
48 |
+commit ec87d9f2b6541599dd7fc8aaebf0fdfbb812ade7 |
49 |
+Author: Louis Sautier <sautier.louis@×××××.com> |
50 |
+Date: Tue Jul 20 23:37:27 2021 +0200 |
51 |
+ |
52 |
+ Remove deprecated loop argument from asyncio.sleep/gather calls |
53 |
+ |
54 |
+diff --git a/aiohttp/web.py b/aiohttp/web.py |
55 |
+index 557e3c3b..52dfdf93 100644 |
56 |
+--- a/aiohttp/web.py |
57 |
++++ b/aiohttp/web.py |
58 |
+@@ -441,7 +441,7 @@ def _cancel_tasks( |
59 |
+ task.cancel() |
60 |
+ |
61 |
+ loop.run_until_complete( |
62 |
+- asyncio.gather(*to_cancel, loop=loop, return_exceptions=True) |
63 |
++ asyncio.gather(*to_cancel, return_exceptions=True) |
64 |
+ ) |
65 |
+ |
66 |
+ for task in to_cancel: |
67 |
+diff --git a/tests/test_locks.py b/tests/test_locks.py |
68 |
+index 55fd2330..5f434eac 100644 |
69 |
+--- a/tests/test_locks.py |
70 |
++++ b/tests/test_locks.py |
71 |
+@@ -18,7 +18,7 @@ class TestEventResultOrError: |
72 |
+ return 1 |
73 |
+ |
74 |
+ t = loop.create_task(c()) |
75 |
+- await asyncio.sleep(0, loop=loop) |
76 |
++ await asyncio.sleep(0) |
77 |
+ e = Exception() |
78 |
+ ev.set(exc=e) |
79 |
+ assert (await t) == e |
80 |
+@@ -31,7 +31,7 @@ class TestEventResultOrError: |
81 |
+ return 1 |
82 |
+ |
83 |
+ t = loop.create_task(c()) |
84 |
+- await asyncio.sleep(0, loop=loop) |
85 |
++ await asyncio.sleep(0) |
86 |
+ ev.set() |
87 |
+ assert (await t) == 1 |
88 |
+ |
89 |
+@@ -43,7 +43,7 @@ class TestEventResultOrError: |
90 |
+ |
91 |
+ t1 = loop.create_task(c()) |
92 |
+ t2 = loop.create_task(c()) |
93 |
+- await asyncio.sleep(0, loop=loop) |
94 |
++ await asyncio.sleep(0) |
95 |
+ ev.cancel() |
96 |
+ ev.set() |
97 |
+ |
98 |
+diff --git a/tests/test_proxy_functional.py b/tests/test_proxy_functional.py |
99 |
+index 68763cd4..65c773a1 100644 |
100 |
+--- a/tests/test_proxy_functional.py |
101 |
++++ b/tests/test_proxy_functional.py |
102 |
+@@ -238,7 +238,7 @@ async def test_proxy_http_multi_conn_limit(proxy_test_server, loop) -> None: |
103 |
+ resp = await sess.get(url, proxy=proxy.url) |
104 |
+ |
105 |
+ current_pid = pid |
106 |
+- await asyncio.sleep(0.2, loop=loop) |
107 |
++ await asyncio.sleep(0.2) |
108 |
+ assert current_pid == pid |
109 |
+ |
110 |
+ await resp.release() |
111 |
+@@ -443,7 +443,7 @@ async def xtest_proxy_https_multi_conn_limit(proxy_test_server, loop): |
112 |
+ resp = await sess.get(url, proxy=proxy.url) |
113 |
+ |
114 |
+ current_pid = pid |
115 |
+- await asyncio.sleep(0.2, loop=loop) |
116 |
++ await asyncio.sleep(0.2) |
117 |
+ assert current_pid == pid |
118 |
+ |
119 |
+ await resp.release() |
120 |
+ |