Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/aiohttp/, dev-python/aiohttp/files/
Date: Thu, 20 Jan 2022 14:20:29
Message-Id: 1642688420.20c441c94b486dd95b72684d69b9985f34d4ed0c.mgorny@gentoo
1 commit: 20c441c94b486dd95b72684d69b9985f34d4ed0c
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 20 14:18:15 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 20 14:20:20 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20c441c9
7
8 dev-python/aiohttp: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/aiohttp/Manifest | 2 -
13 dev-python/aiohttp/aiohttp-3.7.4-r2.ebuild | 105 ---------------------
14 dev-python/aiohttp/aiohttp-3.8.0.ebuild | 94 ------------------
15 .../aiohttp/files/aiohttp-3.7.4-brotli.patch | 97 -------------------
16 .../aiohttp/files/aiohttp-3.7.4-fix-py3.10.patch | 73 --------------
17 .../aiohttp/files/aiohttp-3.8.0-examples.patch | 27 ------
18 6 files changed, 398 deletions(-)
19
20 diff --git a/dev-python/aiohttp/Manifest b/dev-python/aiohttp/Manifest
21 index 8f0a324c5f99..7c1042028406 100644
22 --- a/dev-python/aiohttp/Manifest
23 +++ b/dev-python/aiohttp/Manifest
24 @@ -1,3 +1 @@
25 -DIST aiohttp-3.7.4.tar.gz 1114533 BLAKE2B dcae3e66e13df8264d731a3ca65b4718feca8d0e6e1baeb6608dcb9bfb4bd4baaed6bd34297ed5ece78d01189bf9a0b9860845cae4e2b93cc2ba463cc35cfb77 SHA512 66fcc837b388020dc998cbaa2db31e48ecec75bcfaa8af9108e2ea265588dafa5684ca96a8fe3ad6759b22e09a4ae6d4efd8653fb76126eccdc826c15cbbe2e6
26 -DIST aiohttp-3.8.0.tar.gz 7323268 BLAKE2B e3d8f6ec7c4b2de685a261171bc8e29db82b5b4677d0d4d0b103898c71184deda700f4859fff49746ace3079f09714c39d06c7d837cdc7fb26c8ebc4b29da915 SHA512 beb711812ccaab6d820c39e663e4aaba9106e270ab28ccdb8f35b74bc68509876dc30061f3df390e514e6ff8d24ede2e77e3355986ca2c5ee860eba940d72f5b
27 DIST aiohttp-3.8.1.tar.gz 7324180 BLAKE2B 99f85b8510782a31de2d2f6c8efa65ef5c5cde600a5c5f49d6362d5833a0443b9adcaed9beb27c5d8502aca37af154b06017f48836b73d4c61d78204b62b7f05 SHA512 3611549393e50c8d30426aee9ddd23794a71ddefe4384eb549049b93e452fafb38de7ad900737213b61fbe717bd85035a780c1622593eae250328f17d484a0a7
28
29 diff --git a/dev-python/aiohttp/aiohttp-3.7.4-r2.ebuild b/dev-python/aiohttp/aiohttp-3.7.4-r2.ebuild
30 deleted file mode 100644
31 index 15a4eb545b17..000000000000
32 --- a/dev-python/aiohttp/aiohttp-3.7.4-r2.ebuild
33 +++ /dev/null
34 @@ -1,105 +0,0 @@
35 -# Copyright 1999-2021 Gentoo Authors
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI=7
39 -
40 -PYTHON_COMPAT=( python3_{8..10} pypy3 )
41 -
42 -inherit distutils-r1 multiprocessing
43 -
44 -DESCRIPTION="http client/server for asyncio"
45 -HOMEPAGE="https://pypi.org/project/aiohttp/"
46 -SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
47 -
48 -LICENSE="Apache-2.0"
49 -SLOT="0"
50 -KEYWORDS="~alpha amd64 arm arm64 hppa ppc ppc64 ~riscv sparc x86"
51 -
52 -RDEPEND="
53 - <dev-python/async_timeout-4[${PYTHON_USEDEP}]
54 - >=dev-python/attrs-17.3.0[${PYTHON_USEDEP}]
55 - dev-python/chardet[${PYTHON_USEDEP}]
56 - >=dev-python/multidict-4.5.0[${PYTHON_USEDEP}]
57 - >=dev-python/yarl-1.0[${PYTHON_USEDEP}]
58 - dev-python/typing-extensions[${PYTHON_USEDEP}]
59 -"
60 -BDEPEND="
61 - dev-python/cython[${PYTHON_USEDEP}]
62 - test? (
63 - !!dev-python/pytest-aiohttp
64 - app-arch/brotli[python,${PYTHON_USEDEP}]
65 - dev-python/async_generator[${PYTHON_USEDEP}]
66 - dev-python/freezegun[${PYTHON_USEDEP}]
67 - www-servers/gunicorn[${PYTHON_USEDEP}]
68 - dev-python/pytest-forked[${PYTHON_USEDEP}]
69 - dev-python/pytest-mock[${PYTHON_USEDEP}]
70 - dev-python/pytest-timeout[${PYTHON_USEDEP}]
71 - dev-python/pytest-xdist[${PYTHON_USEDEP}]
72 - dev-python/re-assert[${PYTHON_USEDEP}]
73 - dev-python/trustme[${PYTHON_USEDEP}]
74 - )
75 -"
76 -
77 -PATCHES=(
78 - "${FILESDIR}"/aiohttp-3.7.4-brotli.patch
79 - "${FILESDIR}"/aiohttp-3.7.4-fix-py3.10.patch
80 -)
81 -
82 -DOCS=( CHANGES.rst CONTRIBUTORS.txt README.rst )
83 -
84 -distutils_enable_tests pytest
85 -distutils_enable_sphinx docs \
86 - '>=dev-python/alabaster-0.6.2' \
87 - 'dev-python/sphinxcontrib-asyncio' \
88 - 'dev-python/sphinxcontrib-blockdiag' \
89 - 'dev-python/sphinxcontrib-newsfeed' \
90 - 'dev-python/sphinxcontrib-spelling' \
91 - 'dev-python/sphinx' \
92 - 'dev-python/sphinx-aiohttp-theme'
93 -
94 -python_prepare_all() {
95 - # newer chardet works too
96 - sed -e 's|chardet>=2.0,<4.0|chardet>=2.0|' \
97 - -i setup.py aiohttp.egg-info/requires.txt || die
98 -
99 - # takes a very long time, then fails
100 - rm tests/test_pytest_plugin.py || die
101 -
102 - distutils-r1_python_prepare_all
103 -}
104 -
105 -python_test() {
106 - local deselect=(
107 - # fails with a 'runtime warning'
108 - 'tests/test_client_functional.py::test_aiohttp_request_coroutine[pyloop]'
109 -
110 - # fragile to test paths
111 - tests/test_route_def.py::test_static
112 -
113 - # requires Internet
114 - tests/test_formdata.py::test_mark_formdata_as_processed
115 -
116 - # 'Event loop is closed' -- probably broken by old age
117 - 'tests/test_streams.py::TestDataQueue::test_read[pyloop]'
118 - 'tests/test_streams.py::TestDataQueue::test_read_eof[pyloop]'
119 - 'tests/test_streams.py::TestDataQueue::test_read_cancelled[pyloop]'
120 - 'tests/test_streams.py::TestDataQueue::test_read_until_eof[pyloop]'
121 - 'tests/test_streams.py::TestDataQueue::test_read_exc[pyloop]'
122 - 'tests/test_streams.py::TestDataQueue::test_read_exception[pyloop]'
123 - 'tests/test_streams.py::TestDataQueue::test_read_exception_with_data[pyloop]'
124 - 'tests/test_streams.py::TestDataQueue::test_read_exception_on_wait[pyloop]'
125 - 'tests/test_streams.py::TestDataQueue::test_exception_waiter[pyloop]'
126 - )
127 -
128 - [[ ${EPYTHON} == pypy3 ]] && deselect+=(
129 - # fails with a 'runtime warning'
130 - tests/test_multipart.py::TestPartReader::test_read_boundary_with_incomplete_chunk
131 - )
132 -
133 - pushd "${BUILD_DIR}/lib" >/dev/null || die
134 - ln -snf "${S}"/{LICENSE.txt,tests} . || die
135 - epytest -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" --forked \
136 - ${deselect[@]/#/--deselect } tests
137 - rm -rf .hypothesis .pytest_cache tests || die
138 - popd >/dev/null || die
139 -}
140
141 diff --git a/dev-python/aiohttp/aiohttp-3.8.0.ebuild b/dev-python/aiohttp/aiohttp-3.8.0.ebuild
142 deleted file mode 100644
143 index 4e466d1f5b0c..000000000000
144 --- a/dev-python/aiohttp/aiohttp-3.8.0.ebuild
145 +++ /dev/null
146 @@ -1,94 +0,0 @@
147 -# Copyright 1999-2021 Gentoo Authors
148 -# Distributed under the terms of the GNU General Public License v2
149 -
150 -EAPI=8
151 -
152 -PYTHON_COMPAT=( python3_{8..10} pypy3 )
153 -
154 -inherit distutils-r1 multiprocessing
155 -
156 -DESCRIPTION="http client/server for asyncio"
157 -HOMEPAGE="
158 - https://pypi.org/project/aiohttp/
159 - https://github.com/aio-libs/aiohttp/"
160 -SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
161 -
162 -LICENSE="Apache-2.0"
163 -SLOT="0"
164 -KEYWORDS="amd64 arm arm64 ~riscv sparc x86"
165 -
166 -RDEPEND="
167 - app-arch/brotli[python,${PYTHON_USEDEP}]
168 - >=dev-python/aiosignal-1.1.2[${PYTHON_USEDEP}]
169 - >=dev-python/async_timeout-4.0.0_alpha3[${PYTHON_USEDEP}]
170 - >=dev-python/attrs-17.3.0[${PYTHON_USEDEP}]
171 - >=dev-python/charset_normalizer-2.0[${PYTHON_USEDEP}]
172 - >=dev-python/frozenlist-1.1.1[${PYTHON_USEDEP}]
173 - >=dev-python/multidict-4.5.0[${PYTHON_USEDEP}]
174 - >=dev-python/yarl-1.0[${PYTHON_USEDEP}]
175 -"
176 -BDEPEND="
177 - test? (
178 - app-arch/brotli[python,${PYTHON_USEDEP}]
179 - dev-python/async_generator[${PYTHON_USEDEP}]
180 - dev-python/freezegun[${PYTHON_USEDEP}]
181 - www-servers/gunicorn[${PYTHON_USEDEP}]
182 - dev-python/pytest-forked[${PYTHON_USEDEP}]
183 - dev-python/pytest-mock[${PYTHON_USEDEP}]
184 - dev-python/pytest-xdist[${PYTHON_USEDEP}]
185 - dev-python/re-assert[${PYTHON_USEDEP}]
186 - dev-python/trustme[${PYTHON_USEDEP}]
187 - )
188 -"
189 -
190 -DOCS=( CHANGES.rst CONTRIBUTORS.txt README.rst )
191 -
192 -distutils_enable_tests pytest
193 -distutils_enable_sphinx docs \
194 - '>=dev-python/alabaster-0.6.2' \
195 - 'dev-python/sphinxcontrib-asyncio' \
196 - 'dev-python/sphinxcontrib-blockdiag' \
197 - 'dev-python/sphinxcontrib-newsfeed' \
198 - 'dev-python/sphinxcontrib-spelling' \
199 - 'dev-python/sphinx' \
200 - 'dev-python/sphinx-aiohttp-theme'
201 -
202 -# TODO: re-cythonize modules?
203 -
204 -src_prepare() {
205 - local PATCHES=(
206 - "${FILESDIR}"/${P}-examples.patch
207 - )
208 -
209 - # increate a little the timeout
210 - sed -e '/abs_tol=/s/0.001/0.01/' -i tests/test_helpers.py || die
211 -
212 - # xfail_strict fails on py3.10
213 - sed -i -e '/--cov/d' -e '/xfail_strict/d' setup.cfg || die
214 - distutils-r1_src_prepare
215 -}
216 -
217 -python_test() {
218 - local EPYTEST_IGNORE=(
219 - # proxy is not packaged
220 - tests/test_proxy_functional.py
221 - )
222 -
223 - local EPYTEST_DESELECT=(
224 - # runtime warnings
225 - 'tests/test_client_functional.py::test_aiohttp_request_coroutine[pyloop]'
226 - # Internet
227 - tests/test_client_session.py::test_client_session_timeout_zero
228 - )
229 -
230 - [[ ${EPYTHON} == pypy3 ]] && EPYTEST_DESELECT+=(
231 - # C extensions are not used on PyPy3
232 - tests/test_http_parser.py::test_c_parser_loaded
233 - )
234 -
235 - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
236 - local -x PYTEST_PLUGINS=pytest_mock,xdist.plugin,pytest_forked
237 - mv aiohttp aiohttp.hidden || die
238 - epytest -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" --forked
239 - mv aiohttp.hidden aiohttp || die
240 -}
241
242 diff --git a/dev-python/aiohttp/files/aiohttp-3.7.4-brotli.patch b/dev-python/aiohttp/files/aiohttp-3.7.4-brotli.patch
243 deleted file mode 100644
244 index 1e8add007999..000000000000
245 --- a/dev-python/aiohttp/files/aiohttp-3.7.4-brotli.patch
246 +++ /dev/null
247 @@ -1,97 +0,0 @@
248 -From a7424ddf490fc51244d427543cc9683b5427102b Mon Sep 17 00:00:00 2001
249 -From: Felix Yan <felixonmars@×××××××××.org>
250 -Date: Fri, 19 Jul 2019 21:32:55 +0800
251 -Subject: [PATCH] Use Brotli instead of brotlipy (#3803)
252 -MIME-Version: 1.0
253 -Content-Type: text/plain; charset=UTF-8
254 -Content-Transfer-Encoding: 8bit
255 -
256 -brotlipy is stuck at brotli 0.6 and upstream is inactive. Let's switch
257 -to the official binding which is up-to-date.
258 -
259 -(rebased for 3.7.x by Michał Górny)
260 ----
261 - aiohttp/http_parser.py | 25 +++++++++++++++++++++----
262 - docs/client_quickstart.rst | 2 +-
263 - docs/index.rst | 2 +-
264 - setup.py | 2 +-
265 - 4 files changed, 24 insertions(+), 7 deletions(-)
266 -
267 -diff --git a/aiohttp/http_parser.py b/aiohttp/http_parser.py
268 -index 71ba815a..56ecead4 100644
269 ---- a/aiohttp/http_parser.py
270 -+++ b/aiohttp/http_parser.py
271 -@@ -821,10 +821,27 @@ class DeflateBuffer:
272 - if encoding == "br":
273 - if not HAS_BROTLI: # pragma: no cover
274 - raise ContentEncodingError(
275 -- "Can not decode content-encoding: brotli (br). "
276 -- "Please install `brotlipy`"
277 -- )
278 -- self.decompressor = brotli.Decompressor()
279 -+ 'Can not decode content-encoding: brotli (br). '
280 -+ 'Please install `Brotli`')
281 -+
282 -+ class BrotliDecoder:
283 -+ # Supports both 'brotlipy' and 'Brotli' packages
284 -+ # since they share an import name. The top branches
285 -+ # are for 'brotlipy' and bottom branches for 'Brotli'
286 -+ def __init__(self) -> None:
287 -+ self._obj = brotli.Decompressor()
288 -+
289 -+ def decompress(self, data: bytes) -> bytes:
290 -+ if hasattr(self._obj, "decompress"):
291 -+ return self._obj.decompress(data)
292 -+ return self._obj.process(data)
293 -+
294 -+ def flush(self) -> bytes:
295 -+ if hasattr(self._obj, "flush"):
296 -+ return self._obj.flush()
297 -+ return b""
298 -+
299 -+ self.decompressor = BrotliDecoder() # type: Any
300 - else:
301 - zlib_mode = 16 + zlib.MAX_WBITS if encoding == "gzip" else zlib.MAX_WBITS
302 - self.decompressor = zlib.decompressobj(wbits=zlib_mode)
303 -diff --git a/docs/client_quickstart.rst b/docs/client_quickstart.rst
304 -index 95588cb6..b9146584 100644
305 ---- a/docs/client_quickstart.rst
306 -+++ b/docs/client_quickstart.rst
307 -@@ -174,7 +174,7 @@ The ``gzip`` and ``deflate`` transfer-encodings are automatically
308 - decoded for you.
309 -
310 - You can enable ``brotli`` transfer-encodings support,
311 --just install `brotlipy <https://github.com/python-hyper/brotlipy>`_.
312 -+just install `Brotli <https://pypi.org/project/Brotli>`_.
313 -
314 - JSON Request
315 - ============
316 -diff --git a/docs/index.rst b/docs/index.rst
317 -index 13fe723b..4091c001 100644
318 ---- a/docs/index.rst
319 -+++ b/docs/index.rst
320 -@@ -52,7 +52,7 @@ Installing speedups altogether
321 - ------------------------------
322 -
323 - The following will get you ``aiohttp`` along with :term:`chardet`,
324 --:term:`aiodns` and ``brotlipy`` in one bundle. No need to type
325 -+:term:`aiodns` and ``Brotli`` in one bundle. No need to type
326 - separate commands anymore!
327 -
328 - .. code-block:: bash
329 -diff --git a/setup.py b/setup.py
330 -index 54462ba7..7a184817 100644
331 ---- a/setup.py
332 -+++ b/setup.py
333 -@@ -137,7 +137,7 @@ args = dict(
334 - extras_require={
335 - "speedups": [
336 - "aiodns",
337 -- "brotlipy",
338 -+ "Brotli",
339 - "cchardet",
340 - ],
341 - },
342 ---
343 -2.32.0
344 -
345
346 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
347 deleted file mode 100644
348 index 3c7593584b76..000000000000
349 --- a/dev-python/aiohttp/files/aiohttp-3.7.4-fix-py3.10.patch
350 +++ /dev/null
351 @@ -1,73 +0,0 @@
352 -commit ec87d9f2b6541599dd7fc8aaebf0fdfbb812ade7
353 -Author: Louis Sautier <sautier.louis@×××××.com>
354 -Date: Tue Jul 20 23:37:27 2021 +0200
355 -
356 - Remove deprecated loop argument from asyncio.sleep/gather calls
357 -
358 -diff --git a/aiohttp/web.py b/aiohttp/web.py
359 -index 557e3c3b..52dfdf93 100644
360 ---- a/aiohttp/web.py
361 -+++ b/aiohttp/web.py
362 -@@ -441,7 +441,7 @@ def _cancel_tasks(
363 - task.cancel()
364 -
365 - loop.run_until_complete(
366 -- asyncio.gather(*to_cancel, loop=loop, return_exceptions=True)
367 -+ asyncio.gather(*to_cancel, return_exceptions=True)
368 - )
369 -
370 - for task in to_cancel:
371 -diff --git a/tests/test_locks.py b/tests/test_locks.py
372 -index 55fd2330..5f434eac 100644
373 ---- a/tests/test_locks.py
374 -+++ b/tests/test_locks.py
375 -@@ -18,7 +18,7 @@ class TestEventResultOrError:
376 - return 1
377 -
378 - t = loop.create_task(c())
379 -- await asyncio.sleep(0, loop=loop)
380 -+ await asyncio.sleep(0)
381 - e = Exception()
382 - ev.set(exc=e)
383 - assert (await t) == e
384 -@@ -31,7 +31,7 @@ class TestEventResultOrError:
385 - return 1
386 -
387 - t = loop.create_task(c())
388 -- await asyncio.sleep(0, loop=loop)
389 -+ await asyncio.sleep(0)
390 - ev.set()
391 - assert (await t) == 1
392 -
393 -@@ -43,7 +43,7 @@ class TestEventResultOrError:
394 -
395 - t1 = loop.create_task(c())
396 - t2 = loop.create_task(c())
397 -- await asyncio.sleep(0, loop=loop)
398 -+ await asyncio.sleep(0)
399 - ev.cancel()
400 - ev.set()
401 -
402 -diff --git a/tests/test_proxy_functional.py b/tests/test_proxy_functional.py
403 -index 68763cd4..65c773a1 100644
404 ---- a/tests/test_proxy_functional.py
405 -+++ b/tests/test_proxy_functional.py
406 -@@ -238,7 +238,7 @@ async def test_proxy_http_multi_conn_limit(proxy_test_server, loop) -> None:
407 - resp = await sess.get(url, proxy=proxy.url)
408 -
409 - current_pid = pid
410 -- await asyncio.sleep(0.2, loop=loop)
411 -+ await asyncio.sleep(0.2)
412 - assert current_pid == pid
413 -
414 - await resp.release()
415 -@@ -443,7 +443,7 @@ async def xtest_proxy_https_multi_conn_limit(proxy_test_server, loop):
416 - resp = await sess.get(url, proxy=proxy.url)
417 -
418 - current_pid = pid
419 -- await asyncio.sleep(0.2, loop=loop)
420 -+ await asyncio.sleep(0.2)
421 - assert current_pid == pid
422 -
423 - await resp.release()
424 -
425
426 diff --git a/dev-python/aiohttp/files/aiohttp-3.8.0-examples.patch b/dev-python/aiohttp/files/aiohttp-3.8.0-examples.patch
427 deleted file mode 100644
428 index ed3f38f68fe4..000000000000
429 --- a/dev-python/aiohttp/files/aiohttp-3.8.0-examples.patch
430 +++ /dev/null
431 @@ -1,27 +0,0 @@
432 -From bc142f906b3e7c63f0b1492fe3eacb7f00e9fb89 Mon Sep 17 00:00:00 2001
433 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
434 -Date: Mon, 1 Nov 2021 12:37:40 +0100
435 -Subject: [PATCH] Fix setup.cfg not to install "examples" top-level package
436 -
437 ----
438 - setup.cfg | 4 ++++
439 - 1 file changed, 4 insertions(+)
440 -
441 -diff --git a/setup.cfg b/setup.cfg
442 -index 491df546..fa82b6b4 100644
443 ---- a/setup.cfg
444 -+++ b/setup.cfg
445 -@@ -62,6 +62,10 @@ speedups =
446 - Brotli
447 - cchardet
448 -
449 -+[options.packages.find]
450 -+exclude =
451 -+ examples
452 -+
453 - [options.package_data]
454 - # Ref:
455 - # https://setuptools.readthedocs.io/en/latest/setuptools.html#options
456 ---
457 -2.33.1
458 -