[packages/python3-aiohttp] - up to 3.8.1

baggins baggins at pld-linux.org
Mon Nov 29 22:09:34 CET 2021


commit 6241f097953eb7442178d7a359c936375389b0be
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Nov 29 22:09:20 2021 +0100

    - up to 3.8.1

 disable-towncrier.patch      | 41 +++++++++++++++++++++
 python3-aiohttp-brotli.patch | 88 --------------------------------------------
 python3-aiohttp.spec         | 21 +++++------
 3 files changed, 50 insertions(+), 100 deletions(-)
---
diff --git a/python3-aiohttp.spec b/python3-aiohttp.spec
index e8ebb68..aa2349f 100644
--- a/python3-aiohttp.spec
+++ b/python3-aiohttp.spec
@@ -7,20 +7,19 @@
 Summary:	Async http client/server framework
 Summary(pl.UTF-8):	Szkielet asynchronicznego klienta/serwera http
 Name:		python3-aiohttp
-Version:	3.7.4
-Release:	2
+Version:	3.8.1
+Release:	1
 License:	Apache v2.0
 Group:		Libraries/Python
-#Source0Download: https://pypi.org/simple/aiohttp/
 Source0:	https://files.pythonhosted.org/packages/source/a/aiohttp/aiohttp-%{version}.tar.gz
-# Source0-md5:	586eb4e4dcb1e41242ede0c5bcfd4014
-# adjusted from https://github.com/aio-libs/aiohttp/commit/9afc44b052643213da15c9583ecbd643ca999601.patch
-Patch0:		%{name}-brotli.patch
+# Source0-md5:	faf7726dc65a940272874c0f441e8ec6
+Patch0:		disable-towncrier.patch
 URL:		https://pypi.org/project/aiohttp/
 BuildRequires:	python3-devel >= 1:3.6
 BuildRequires:	python3-setuptools
 %if %{with tests}
-BuildRequires:	python3-async_timeout >= 3.0
+BuildRequires:	python3-aiosignal
+BuildRequires:	python3-async_timeout >= 4.0
 BuildRequires:	python3-attrs >= 17.3.0
 BuildRequires:	python3-brotli
 BuildRequires:	python3-chardet >= 2.0
@@ -39,8 +38,6 @@ BuildRequires:	python3-yarl >= 1.0
 %endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
-# if using noarchpackage, replace with:
-#BuildRequires:	rpmbuild(macros) >= 1.752
 BuildRequires:	sed >= 4.0
 %if %{with doc}
 BuildRequires:	python3-aiohttp_theme
@@ -48,7 +45,6 @@ BuildRequires:	python3-sphinxcontrib-asyncio
 BuildRequires:	python3-sphinxcontrib-blockdiag
 BuildRequires:	sphinx-pdg-3
 %endif
-# replace with other requires if defined in setup.py
 Requires:	python3-modules >= 1:3.6
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -74,7 +70,7 @@ Dokumentacja API aiohttp.
 %setup -q -n aiohttp-%{version}
 %patch0 -p1
 
-%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' examples/*.py examples/legacy/*.py
+%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' examples/*.py
 
 # adjust for python 3.7+
 %{__sed} -i -e '/^from async_generator/d; /^ *@async_generator/d; s/await yield_/yield/' tests/*.py
@@ -89,9 +85,10 @@ Dokumentacja API aiohttp.
 # test_data_stream_exc_chain uses network, fails
 # test_async_iterable_payload_default_content_type, test_async_iterable_payload_explicit_content_type fail with TypeError (need update?)
 # test_mark_formdata_as_processed requires network
+%{__mv} tests/test_proxy_functional.py{,.disabled} # needs proxy_py binary
 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
 PYTEST_PLUGINS="pytest_cov.plugin,pytest_mock" \
-%{__python3} -m pytest tests -k 'not (test_data_stream_exc_chain or test_async_iterable_payload_default_content_type or test_async_iterable_payload_explicit_content_type or test_mark_formdata_as_processed)'
+%{__python3} -m pytest tests -k 'not (test_data_stream_exc_chain or test_async_iterable_payload_default_content_type or test_async_iterable_payload_explicit_content_type or test_mark_formdata_as_processed or test_c_parser_loaded or test_aiohttp_plugin_async_fixture)'
 %endif
 
 %if %{with doc}
diff --git a/disable-towncrier.patch b/disable-towncrier.patch
new file mode 100644
index 0000000..6e46d10
--- /dev/null
+++ b/disable-towncrier.patch
@@ -0,0 +1,41 @@
+Extension error (sphinxcontrib.towncrier):
+Handler <bound method TowncrierDraftEntriesEnvironmentCollector.get_outdated_docs of <sphinxcontrib.towncrier.TowncrierDraftEntriesEnvironmentCollector object at 0xf5667f58>> for event 'env-get-outdated' threw an exception (exception: The template file '/home/users/baggins/devel/PLD/rpm/BUILD/aiohttp-3.8.1/CHANGES/.TEMPLATE.rst' does not exist.)
+
+--- aiohttp-3.8.1/docs/conf.py~	2021-11-14 21:05:00.000000000 +0100
++++ aiohttp-3.8.1/docs/conf.py	2021-11-29 22:01:37.743925807 +0100
+@@ -54,7 +54,6 @@
+     # Third-party extensions:
+     "sphinxcontrib.asyncio",
+     "sphinxcontrib.blockdiag",
+-    "sphinxcontrib.towncrier",  # provides `towncrier-draft-entries` directive
+ ]
+ 
+ 
+@@ -439,10 +438,3 @@
+     ("py:exc", "HTTPMethodNotAllowed"),  # undocumented
+     ("py:class", "HTTPMethodNotAllowed"),  # undocumented
+ ]
+-
+-# -- Options for towncrier_draft extension -----------------------------------
+-
+-towncrier_draft_autoversion_mode = "draft"  # or: 'sphinx-version', 'sphinx-release'
+-towncrier_draft_include_empty = True
+-towncrier_draft_working_directory = PROJECT_ROOT_DIR
+-# Not yet supported: towncrier_draft_config_path = 'pyproject.toml'  # relative to cwd
+--- aiohttp-3.8.1/docs/changes.rst~	2021-11-14 21:05:00.000000000 +0100
++++ aiohttp-3.8.1/docs/changes.rst	2021-11-29 22:05:27.441003864 +0100
+@@ -4,14 +4,7 @@
+ Changelog
+ =========
+ 
+-To be included in v\ |release| (if present)
+-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-
+-.. towncrier-draft-entries:: |release| [UNRELEASED DRAFT]
+-
+ Released versions
+ ^^^^^^^^^^^^^^^^^
+ 
+ .. include:: ../CHANGES.rst
+-
+-.. include:: ../HISTORY.rst
diff --git a/python3-aiohttp-brotli.patch b/python3-aiohttp-brotli.patch
deleted file mode 100644
index 0bc4de0..0000000
--- a/python3-aiohttp-brotli.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 9afc44b052643213da15c9583ecbd643ca999601 Mon Sep 17 00:00:00 2001
-From: Felix Yan <felixonmars at archlinux.org>
-Date: Fri, 19 Jul 2019 21:32:55 +0800
-Subject: [PATCH] Use Brotli instead of brotlipy (#3803)
-
-brotlipy is stuck at brotli 0.6 and upstream is inactive. Let's switch
-to the official binding which is up-to-date.
----
- CHANGES/3803.feature       |  1 +
- CONTRIBUTORS.txt           |  1 +
- aiohttp/http_parser.py     | 22 ++++++++++++++++++++--
- docs/client_quickstart.rst |  2 +-
- docs/index.rst             |  2 +-
- requirements/ci-wheel.txt  |  2 +-
- setup.py                   |  2 +-
- tox.ini                    |  2 +-
- 8 files changed, 27 insertions(+), 7 deletions(-)
- create mode 100644 CHANGES/3803.feature
-
---- aiohttp-3.7.3/aiohttp/http_parser.py.orig	2021-02-06 22:03:16.853983452 +0100
-+++ aiohttp-3.7.3/aiohttp/http_parser.py	2021-02-06 22:22:29.544405459 +0100
-@@ -810,9 +810,26 @@
-             if not HAS_BROTLI:  # pragma: no cover
-                 raise ContentEncodingError(
-                     "Can not decode content-encoding: brotli (br). "
--                    "Please install `brotlipy`"
--                )
--            self.decompressor = brotli.Decompressor()
-+                    "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 f58eb7166f..1d5d2fb448 100644
---- a/docs/client_quickstart.rst
-+++ b/docs/client_quickstart.rst
-@@ -171,7 +171,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 aa20a78fe9..56aa7389f6 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
---- aiohttp-3.7.3/setup.py.orig	2021-02-06 22:24:15.207166368 +0100
-+++ aiohttp-3.7.3/setup.py	2021-02-06 22:24:45.976999674 +0100
-@@ -137,7 +137,7 @@
-     extras_require={
-         "speedups": [
-             "aiodns",
--            "brotlipy",
-+            "Brotli",
-             "cchardet",
-         ],
-     },
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-aiohttp.git/commitdiff/6241f097953eb7442178d7a359c936375389b0be



More information about the pld-cvs-commit mailing list