1 |
commit: 429ee757d193dc71ac56b63577f0892eac3fe466 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 19 17:08:04 2021 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 19 17:08:04 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=429ee757 |
7 |
|
8 |
dev-python/aws-xray-sdk-python: enable py3.10 |
9 |
|
10 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
11 |
|
12 |
.../aws-xray-sdk-python-2.8.0.ebuild | 40 ++++++++++------------ |
13 |
...ws-xray-sdk-python-2.8.0-fix-py3.10-loops.patch | 36 +++++++++++++++++++ |
14 |
2 files changed, 55 insertions(+), 21 deletions(-) |
15 |
|
16 |
diff --git a/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.8.0.ebuild b/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.8.0.ebuild |
17 |
index 560c3e416da..d07a31c0dce 100644 |
18 |
--- a/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.8.0.ebuild |
19 |
+++ b/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.8.0.ebuild |
20 |
@@ -2,7 +2,8 @@ |
21 |
# Distributed under the terms of the GNU General Public License v2 |
22 |
|
23 |
EAPI=7 |
24 |
-PYTHON_COMPAT=( python3_{7..9} ) |
25 |
+ |
26 |
+PYTHON_COMPAT=( python3_{8..10} ) |
27 |
|
28 |
inherit distutils-r1 |
29 |
|
30 |
@@ -15,7 +16,6 @@ SRC_URI=" |
31 |
LICENSE="Apache-2.0" |
32 |
SLOT="0" |
33 |
KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux" |
34 |
-IUSE="" |
35 |
|
36 |
RDEPEND=" |
37 |
>=dev-python/botocore-1.12.122[${PYTHON_USEDEP}] |
38 |
@@ -33,6 +33,10 @@ BDEPEND=" |
39 |
dev-python/webtest[${PYTHON_USEDEP}] |
40 |
)" |
41 |
|
42 |
+PATCHES=( |
43 |
+ "${FILESDIR}/${P}-fix-py3.10-loops.patch" |
44 |
+) |
45 |
+ |
46 |
distutils_enable_tests pytest |
47 |
|
48 |
python_test() { |
49 |
@@ -40,34 +44,28 @@ python_test() { |
50 |
local -x AWS_SECRET_ACCESS_KEY=fake_key |
51 |
local -x AWS_ACCESS_KEY_ID=fake_id |
52 |
|
53 |
- local args=( |
54 |
- # unpackaged deps |
55 |
- --ignore tests/ext/aiobotocore |
56 |
- --ignore tests/ext/pg8000 |
57 |
- --ignore tests/ext/psycopg2 |
58 |
- --ignore tests/ext/pymysql |
59 |
- --ignore tests/ext/pynamodb |
60 |
- --ignore tests/ext/sqlalchemy_core/test_postgres.py |
61 |
- --deselect tests/ext/django/test_db.py |
62 |
- |
63 |
+ local EPYTEST_DESELECT=( |
64 |
# Internet access |
65 |
- --deselect |
66 |
tests/test_patcher.py::test_external_file |
67 |
- --deselect |
68 |
tests/test_patcher.py::test_external_module |
69 |
- --deselect |
70 |
tests/test_patcher.py::test_external_submodules_full |
71 |
- --deselect |
72 |
tests/test_patcher.py::test_external_submodules_ignores_file |
73 |
- --deselect |
74 |
tests/test_patcher.py::test_external_submodules_ignores_module |
75 |
- --deselect |
76 |
tests/ext/aiohttp/test_client.py |
77 |
- --ignore |
78 |
+ ) |
79 |
+ local EPYTEST_IGNORE=( |
80 |
+ # unpackaged deps |
81 |
+ tests/ext/aiobotocore |
82 |
+ tests/ext/pg8000 |
83 |
+ tests/ext/psycopg2 |
84 |
+ tests/ext/pymysql |
85 |
+ tests/ext/pynamodb |
86 |
+ tests/ext/sqlalchemy_core/test_postgres.py |
87 |
+ tests/ext/django/test_db.py |
88 |
+ # Internet access |
89 |
tests/ext/httplib |
90 |
- --ignore |
91 |
tests/ext/requests |
92 |
) |
93 |
|
94 |
- epytest -p no:django "${args[@]}" |
95 |
+ epytest -p no:django |
96 |
} |
97 |
|
98 |
diff --git a/dev-python/aws-xray-sdk-python/files/aws-xray-sdk-python-2.8.0-fix-py3.10-loops.patch b/dev-python/aws-xray-sdk-python/files/aws-xray-sdk-python-2.8.0-fix-py3.10-loops.patch |
99 |
new file mode 100644 |
100 |
index 00000000000..cde91a8d0cd |
101 |
--- /dev/null |
102 |
+++ b/dev-python/aws-xray-sdk-python/files/aws-xray-sdk-python-2.8.0-fix-py3.10-loops.patch |
103 |
@@ -0,0 +1,36 @@ |
104 |
+diff --git a/tests/ext/aiohttp/test_middleware.py b/tests/ext/aiohttp/test_middleware.py |
105 |
+index c8b2333..4f8cac6 100644 |
106 |
+--- a/tests/ext/aiohttp/test_middleware.py |
107 |
++++ b/tests/ext/aiohttp/test_middleware.py |
108 |
+@@ -279,8 +279,7 @@ async def test_concurrent(test_client, loop, recorder): |
109 |
+ |
110 |
+ await asyncio.wait([get_delay(), get_delay(), get_delay(), |
111 |
+ get_delay(), get_delay(), get_delay(), |
112 |
+- get_delay(), get_delay(), get_delay()], |
113 |
+- loop=loop) |
114 |
++ get_delay(), get_delay(), get_delay()]) |
115 |
+ |
116 |
+ # Ensure all ID's are different |
117 |
+ ids = [item.id for item in recorder.emitter.local] |
118 |
+diff --git a/tests/test_async_local_storage.py b/tests/test_async_local_storage.py |
119 |
+index b43cc0e..4b13ffd 100644 |
120 |
+--- a/tests/test_async_local_storage.py |
121 |
++++ b/tests/test_async_local_storage.py |
122 |
+@@ -19,7 +19,7 @@ def test_localstorage_isolation(loop): |
123 |
+ random_int = random.random() |
124 |
+ local_storage.randint = random_int |
125 |
+ |
126 |
+- await asyncio.sleep(0.0, loop=loop) |
127 |
++ await asyncio.sleep(0.0) |
128 |
+ |
129 |
+ current_random_int = local_storage.randint |
130 |
+ assert random_int == current_random_int |
131 |
+@@ -30,7 +30,7 @@ def test_localstorage_isolation(loop): |
132 |
+ |
133 |
+ # Run loads of concurrent tasks |
134 |
+ results = loop.run_until_complete( |
135 |
+- asyncio.wait([_test() for _ in range(0, 100)], loop=loop) |
136 |
++ asyncio.wait([_test() for _ in range(0, 100)]) |
137 |
+ ) |
138 |
+ results = [item.result() for item in results[0]] |
139 |
+ |