diff options
| author | Michał Górny <mgorny@gentoo.org> | 2022-01-20 15:18:15 +0100 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2022-01-20 15:20:20 +0100 |
| commit | 20c441c94b486dd95b72684d69b9985f34d4ed0c (patch) | |
| tree | 5d640edafa418469391a1c1fffdfe33a9073275b /dev-python/aiohttp/files | |
| parent | 41b21a84e26cd3d02d6c2183a7b7edad98ecc582 (diff) | |
| download | gentoo-20c441c94b486dd95b72684d69b9985f34d4ed0c.tar.gz gentoo-20c441c94b486dd95b72684d69b9985f34d4ed0c.tar.bz2 gentoo-20c441c94b486dd95b72684d69b9985f34d4ed0c.zip | |
dev-python/aiohttp: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/aiohttp/files')
| -rw-r--r-- | dev-python/aiohttp/files/aiohttp-3.7.4-brotli.patch | 97 | ||||
| -rw-r--r-- | dev-python/aiohttp/files/aiohttp-3.7.4-fix-py3.10.patch | 73 | ||||
| -rw-r--r-- | dev-python/aiohttp/files/aiohttp-3.8.0-examples.patch | 27 |
3 files changed, 0 insertions, 197 deletions
diff --git a/dev-python/aiohttp/files/aiohttp-3.7.4-brotli.patch b/dev-python/aiohttp/files/aiohttp-3.7.4-brotli.patch deleted file mode 100644 index 1e8add007999..000000000000 --- a/dev-python/aiohttp/files/aiohttp-3.7.4-brotli.patch +++ /dev/null @@ -1,97 +0,0 @@ -From a7424ddf490fc51244d427543cc9683b5427102b Mon Sep 17 00:00:00 2001 -From: Felix Yan <felixonmars@archlinux.org> -Date: Fri, 19 Jul 2019 21:32:55 +0800 -Subject: [PATCH] Use Brotli instead of brotlipy (#3803) -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -brotlipy is stuck at brotli 0.6 and upstream is inactive. Let's switch -to the official binding which is up-to-date. - -(rebased for 3.7.x by Michał Górny) ---- - aiohttp/http_parser.py | 25 +++++++++++++++++++++---- - docs/client_quickstart.rst | 2 +- - docs/index.rst | 2 +- - setup.py | 2 +- - 4 files changed, 24 insertions(+), 7 deletions(-) - -diff --git a/aiohttp/http_parser.py b/aiohttp/http_parser.py -index 71ba815a..56ecead4 100644 ---- a/aiohttp/http_parser.py -+++ b/aiohttp/http_parser.py -@@ -821,10 +821,27 @@ class DeflateBuffer: - if encoding == "br": - if not HAS_BROTLI: # pragma: no cover - raise ContentEncodingError( -- "Can not decode content-encoding: brotli (br). " -- "Please install `brotlipy`" -- ) -- self.decompressor = brotli.Decompressor() -+ 'Can not decode content-encoding: brotli (br). ' -+ 'Please install `Brotli`') -+ -+ class BrotliDecoder: -+ # Supports both 'brotlipy' and 'Brotli' packages -+ # since they share an import name. The top branches -+ # are for 'brotlipy' and bottom branches for 'Brotli' -+ def __init__(self) -> None: -+ self._obj = brotli.Decompressor() -+ -+ def decompress(self, data: bytes) -> bytes: -+ if hasattr(self._obj, "decompress"): -+ return self._obj.decompress(data) -+ return self._obj.process(data) -+ -+ def flush(self) -> bytes: -+ if hasattr(self._obj, "flush"): -+ return self._obj.flush() -+ return b"" -+ -+ self.decompressor = BrotliDecoder() # type: Any - else: - zlib_mode = 16 + zlib.MAX_WBITS if encoding == "gzip" else zlib.MAX_WBITS - self.decompressor = zlib.decompressobj(wbits=zlib_mode) -diff --git a/docs/client_quickstart.rst b/docs/client_quickstart.rst -index 95588cb6..b9146584 100644 ---- a/docs/client_quickstart.rst -+++ b/docs/client_quickstart.rst -@@ -174,7 +174,7 @@ The ``gzip`` and ``deflate`` transfer-encodings are automatically - decoded for you. - - You can enable ``brotli`` transfer-encodings support, --just install `brotlipy <https://github.com/python-hyper/brotlipy>`_. -+just install `Brotli <https://pypi.org/project/Brotli>`_. - - JSON Request - ============ -diff --git a/docs/index.rst b/docs/index.rst -index 13fe723b..4091c001 100644 ---- a/docs/index.rst -+++ b/docs/index.rst -@@ -52,7 +52,7 @@ Installing speedups altogether - ------------------------------ - - The following will get you ``aiohttp`` along with :term:`chardet`, --:term:`aiodns` and ``brotlipy`` in one bundle. No need to type -+:term:`aiodns` and ``Brotli`` in one bundle. No need to type - separate commands anymore! - - .. code-block:: bash -diff --git a/setup.py b/setup.py -index 54462ba7..7a184817 100644 ---- a/setup.py -+++ b/setup.py -@@ -137,7 +137,7 @@ args = dict( - extras_require={ - "speedups": [ - "aiodns", -- "brotlipy", -+ "Brotli", - "cchardet", - ], - }, --- -2.32.0 - 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 deleted file mode 100644 index 3c7593584b76..000000000000 --- a/dev-python/aiohttp/files/aiohttp-3.7.4-fix-py3.10.patch +++ /dev/null @@ -1,73 +0,0 @@ -commit ec87d9f2b6541599dd7fc8aaebf0fdfbb812ade7 -Author: Louis Sautier <sautier.louis@gmail.com> -Date: Tue Jul 20 23:37:27 2021 +0200 - - Remove deprecated loop argument from asyncio.sleep/gather calls - -diff --git a/aiohttp/web.py b/aiohttp/web.py -index 557e3c3b..52dfdf93 100644 ---- a/aiohttp/web.py -+++ b/aiohttp/web.py -@@ -441,7 +441,7 @@ def _cancel_tasks( - task.cancel() - - loop.run_until_complete( -- asyncio.gather(*to_cancel, loop=loop, return_exceptions=True) -+ asyncio.gather(*to_cancel, return_exceptions=True) - ) - - for task in to_cancel: -diff --git a/tests/test_locks.py b/tests/test_locks.py -index 55fd2330..5f434eac 100644 ---- a/tests/test_locks.py -+++ b/tests/test_locks.py -@@ -18,7 +18,7 @@ class TestEventResultOrError: - return 1 - - t = loop.create_task(c()) -- await asyncio.sleep(0, loop=loop) -+ await asyncio.sleep(0) - e = Exception() - ev.set(exc=e) - assert (await t) == e -@@ -31,7 +31,7 @@ class TestEventResultOrError: - return 1 - - t = loop.create_task(c()) -- await asyncio.sleep(0, loop=loop) -+ await asyncio.sleep(0) - ev.set() - assert (await t) == 1 - -@@ -43,7 +43,7 @@ class TestEventResultOrError: - - t1 = loop.create_task(c()) - t2 = loop.create_task(c()) -- await asyncio.sleep(0, loop=loop) -+ await asyncio.sleep(0) - ev.cancel() - ev.set() - -diff --git a/tests/test_proxy_functional.py b/tests/test_proxy_functional.py -index 68763cd4..65c773a1 100644 ---- a/tests/test_proxy_functional.py -+++ b/tests/test_proxy_functional.py -@@ -238,7 +238,7 @@ async def test_proxy_http_multi_conn_limit(proxy_test_server, loop) -> None: - resp = await sess.get(url, proxy=proxy.url) - - current_pid = pid -- await asyncio.sleep(0.2, loop=loop) -+ await asyncio.sleep(0.2) - assert current_pid == pid - - await resp.release() -@@ -443,7 +443,7 @@ async def xtest_proxy_https_multi_conn_limit(proxy_test_server, loop): - resp = await sess.get(url, proxy=proxy.url) - - current_pid = pid -- await asyncio.sleep(0.2, loop=loop) -+ await asyncio.sleep(0.2) - assert current_pid == pid - - await resp.release() - diff --git a/dev-python/aiohttp/files/aiohttp-3.8.0-examples.patch b/dev-python/aiohttp/files/aiohttp-3.8.0-examples.patch deleted file mode 100644 index ed3f38f68fe4..000000000000 --- a/dev-python/aiohttp/files/aiohttp-3.8.0-examples.patch +++ /dev/null @@ -1,27 +0,0 @@ -From bc142f906b3e7c63f0b1492fe3eacb7f00e9fb89 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Mon, 1 Nov 2021 12:37:40 +0100 -Subject: [PATCH] Fix setup.cfg not to install "examples" top-level package - ---- - setup.cfg | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/setup.cfg b/setup.cfg -index 491df546..fa82b6b4 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -62,6 +62,10 @@ speedups = - Brotli - cchardet - -+[options.packages.find] -+exclude = -+ examples -+ - [options.package_data] - # Ref: - # https://setuptools.readthedocs.io/en/latest/setuptools.html#options --- -2.33.1 - |
