public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/aiohttp/, dev-python/aiohttp/files/
@ 2021-07-29 18:47 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2021-07-29 18:47 UTC (permalink / raw
  To: gentoo-commits

commit:     0467886b731053bc339461912e0c4efe20dccf8f
Author:     Arthur Zamarin <arthurzam <AT> gmail <DOT> com>
AuthorDate: Sat Jul 24 16:51:26 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul 29 18:46:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0467886b

dev-python/aiohttp: enable py3.10

patch taken from comment here:
https://github.com/aio-libs/aiohttp/issues/5905

Signed-off-by: Arthur Zamarin <arthurzam <AT> gmail.com>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/aiohttp/aiohttp-3.7.4-r1.ebuild         |  3 +-
 .../aiohttp/files/aiohttp-3.7.4-fix-py3.10.patch   | 73 ++++++++++++++++++++++
 2 files changed, 75 insertions(+), 1 deletion(-)

diff --git a/dev-python/aiohttp/aiohttp-3.7.4-r1.ebuild b/dev-python/aiohttp/aiohttp-3.7.4-r1.ebuild
index 3871075876e..4c0cea0a0d1 100644
--- a/dev-python/aiohttp/aiohttp-3.7.4-r1.ebuild
+++ b/dev-python/aiohttp/aiohttp-3.7.4-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{8..9} )
+PYTHON_COMPAT=( python3_{8..10} )
 
 inherit distutils-r1 multiprocessing
 
@@ -42,6 +42,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/aiohttp-3.7.4-brotli.patch
+	"${FILESDIR}"/aiohttp-3.7.4-fix-py3.10.patch
 )
 
 DOCS=( CHANGES.rst CONTRIBUTORS.txt README.rst )

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
new file mode 100644
index 00000000000..3c7593584b7
--- /dev/null
+++ b/dev-python/aiohttp/files/aiohttp-3.7.4-fix-py3.10.patch
@@ -0,0 +1,73 @@
+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()
+


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/aiohttp/, dev-python/aiohttp/files/
@ 2021-11-01 11:40 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2021-11-01 11:40 UTC (permalink / raw
  To: gentoo-commits

commit:     320b8fba60f8469b023f3291ce56f3491982f1ef
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  1 11:31:09 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Nov  1 11:40:39 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=320b8fba

dev-python/aiohttp: Bump to 3.8.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/aiohttp/Manifest                        |  1 +
 dev-python/aiohttp/aiohttp-3.8.0.ebuild            | 94 ++++++++++++++++++++++
 .../aiohttp/files/aiohttp-3.8.0-examples.patch     | 27 +++++++
 3 files changed, 122 insertions(+)

diff --git a/dev-python/aiohttp/Manifest b/dev-python/aiohttp/Manifest
index c5a16a92aa4..8ee6cae8dde 100644
--- a/dev-python/aiohttp/Manifest
+++ b/dev-python/aiohttp/Manifest
@@ -1 +1,2 @@
 DIST aiohttp-3.7.4.tar.gz 1114533 BLAKE2B dcae3e66e13df8264d731a3ca65b4718feca8d0e6e1baeb6608dcb9bfb4bd4baaed6bd34297ed5ece78d01189bf9a0b9860845cae4e2b93cc2ba463cc35cfb77 SHA512 66fcc837b388020dc998cbaa2db31e48ecec75bcfaa8af9108e2ea265588dafa5684ca96a8fe3ad6759b22e09a4ae6d4efd8653fb76126eccdc826c15cbbe2e6
+DIST aiohttp-3.8.0.tar.gz 7323268 BLAKE2B e3d8f6ec7c4b2de685a261171bc8e29db82b5b4677d0d4d0b103898c71184deda700f4859fff49746ace3079f09714c39d06c7d837cdc7fb26c8ebc4b29da915 SHA512 beb711812ccaab6d820c39e663e4aaba9106e270ab28ccdb8f35b74bc68509876dc30061f3df390e514e6ff8d24ede2e77e3355986ca2c5ee860eba940d72f5b

diff --git a/dev-python/aiohttp/aiohttp-3.8.0.ebuild b/dev-python/aiohttp/aiohttp-3.8.0.ebuild
new file mode 100644
index 00000000000..a5d3ec99226
--- /dev/null
+++ b/dev-python/aiohttp/aiohttp-3.8.0.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
+
+inherit distutils-r1 multiprocessing
+
+DESCRIPTION="http client/server for asyncio"
+HOMEPAGE="
+	https://pypi.org/project/aiohttp/
+	https://github.com/aio-libs/aiohttp/"
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+	app-arch/brotli[python,${PYTHON_USEDEP}]
+	>=dev-python/aiosignal-1.1.2[${PYTHON_USEDEP}]
+	>=dev-python/async_timeout-4.0.0_alpha3[${PYTHON_USEDEP}]
+	>=dev-python/attrs-17.3.0[${PYTHON_USEDEP}]
+	>=dev-python/charset_normalizer-2.0[${PYTHON_USEDEP}]
+	>=dev-python/frozenlist-1.1.1[${PYTHON_USEDEP}]
+	>=dev-python/multidict-4.5.0[${PYTHON_USEDEP}]
+	>=dev-python/yarl-1.0[${PYTHON_USEDEP}]
+	$(python_gen_cond_dep '
+		>=dev-python/pypy3-7.3.6
+	' pypy3)
+"
+BDEPEND="
+	test? (
+		app-arch/brotli[python,${PYTHON_USEDEP}]
+		dev-python/async_generator[${PYTHON_USEDEP}]
+		dev-python/freezegun[${PYTHON_USEDEP}]
+		www-servers/gunicorn[${PYTHON_USEDEP}]
+		dev-python/pytest-forked[${PYTHON_USEDEP}]
+		dev-python/pytest-mock[${PYTHON_USEDEP}]
+		dev-python/pytest-xdist[${PYTHON_USEDEP}]
+		dev-python/re-assert[${PYTHON_USEDEP}]
+		dev-python/trustme[${PYTHON_USEDEP}]
+	)
+"
+
+DOCS=( CHANGES.rst CONTRIBUTORS.txt README.rst )
+
+distutils_enable_tests pytest
+distutils_enable_sphinx docs \
+	'>=dev-python/alabaster-0.6.2' \
+	'dev-python/sphinxcontrib-asyncio' \
+	'dev-python/sphinxcontrib-blockdiag' \
+	'dev-python/sphinxcontrib-newsfeed' \
+	'dev-python/sphinxcontrib-spelling' \
+	'dev-python/sphinx' \
+	'dev-python/sphinx-aiohttp-theme'
+
+# TODO: re-cythonize modules?
+
+src_prepare() {
+	local PATCHES=(
+		"${FILESDIR}"/${P}-examples.patch
+	)
+
+	# xfail_strict fails on py3.10
+	sed -i -e '/--cov/d' -e '/xfail_strict/d' setup.cfg || die
+	distutils-r1_src_prepare
+}
+
+python_test() {
+	local EPYTEST_IGNORE=(
+		# proxy is not packaged
+		tests/test_proxy_functional.py
+	)
+
+	local EPYTEST_DESELECT=(
+		# runtime warnings
+		'tests/test_client_functional.py::test_aiohttp_request_coroutine[pyloop]'
+		# Internet
+		tests/test_client_session.py::test_client_session_timeout_zero
+	)
+
+	[[ ${EPYTHON} == pypy3 ]] && EPYTEST_DESELECT+=(
+		# C extensions are not used on PyPy3
+		tests/test_http_parser.py::test_c_parser_loaded
+	)
+
+	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+	local -x PYTEST_PLUGINS=pytest_mock,xdist.plugin,pytest_forked
+	mv aiohttp aiohttp.hidden || die
+	epytest -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" --forked
+	mv aiohttp.hidden aiohttp || die
+}

diff --git a/dev-python/aiohttp/files/aiohttp-3.8.0-examples.patch b/dev-python/aiohttp/files/aiohttp-3.8.0-examples.patch
new file mode 100644
index 00000000000..ed3f38f68fe
--- /dev/null
+++ b/dev-python/aiohttp/files/aiohttp-3.8.0-examples.patch
@@ -0,0 +1,27 @@
+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
+


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/aiohttp/, dev-python/aiohttp/files/
@ 2022-01-20 14:20 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2022-01-20 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     20c441c94b486dd95b72684d69b9985f34d4ed0c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 20 14:18:15 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jan 20 14:20:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20c441c9

dev-python/aiohttp: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/aiohttp/Manifest                        |   2 -
 dev-python/aiohttp/aiohttp-3.7.4-r2.ebuild         | 105 ---------------------
 dev-python/aiohttp/aiohttp-3.8.0.ebuild            |  94 ------------------
 .../aiohttp/files/aiohttp-3.7.4-brotli.patch       |  97 -------------------
 .../aiohttp/files/aiohttp-3.7.4-fix-py3.10.patch   |  73 --------------
 .../aiohttp/files/aiohttp-3.8.0-examples.patch     |  27 ------
 6 files changed, 398 deletions(-)

diff --git a/dev-python/aiohttp/Manifest b/dev-python/aiohttp/Manifest
index 8f0a324c5f99..7c1042028406 100644
--- a/dev-python/aiohttp/Manifest
+++ b/dev-python/aiohttp/Manifest
@@ -1,3 +1 @@
-DIST aiohttp-3.7.4.tar.gz 1114533 BLAKE2B dcae3e66e13df8264d731a3ca65b4718feca8d0e6e1baeb6608dcb9bfb4bd4baaed6bd34297ed5ece78d01189bf9a0b9860845cae4e2b93cc2ba463cc35cfb77 SHA512 66fcc837b388020dc998cbaa2db31e48ecec75bcfaa8af9108e2ea265588dafa5684ca96a8fe3ad6759b22e09a4ae6d4efd8653fb76126eccdc826c15cbbe2e6
-DIST aiohttp-3.8.0.tar.gz 7323268 BLAKE2B e3d8f6ec7c4b2de685a261171bc8e29db82b5b4677d0d4d0b103898c71184deda700f4859fff49746ace3079f09714c39d06c7d837cdc7fb26c8ebc4b29da915 SHA512 beb711812ccaab6d820c39e663e4aaba9106e270ab28ccdb8f35b74bc68509876dc30061f3df390e514e6ff8d24ede2e77e3355986ca2c5ee860eba940d72f5b
 DIST aiohttp-3.8.1.tar.gz 7324180 BLAKE2B 99f85b8510782a31de2d2f6c8efa65ef5c5cde600a5c5f49d6362d5833a0443b9adcaed9beb27c5d8502aca37af154b06017f48836b73d4c61d78204b62b7f05 SHA512 3611549393e50c8d30426aee9ddd23794a71ddefe4384eb549049b93e452fafb38de7ad900737213b61fbe717bd85035a780c1622593eae250328f17d484a0a7

diff --git a/dev-python/aiohttp/aiohttp-3.7.4-r2.ebuild b/dev-python/aiohttp/aiohttp-3.7.4-r2.ebuild
deleted file mode 100644
index 15a4eb545b17..000000000000
--- a/dev-python/aiohttp/aiohttp-3.7.4-r2.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
-
-inherit distutils-r1 multiprocessing
-
-DESCRIPTION="http client/server for asyncio"
-HOMEPAGE="https://pypi.org/project/aiohttp/"
-SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ppc ppc64 ~riscv sparc x86"
-
-RDEPEND="
-	<dev-python/async_timeout-4[${PYTHON_USEDEP}]
-	>=dev-python/attrs-17.3.0[${PYTHON_USEDEP}]
-	dev-python/chardet[${PYTHON_USEDEP}]
-	>=dev-python/multidict-4.5.0[${PYTHON_USEDEP}]
-	>=dev-python/yarl-1.0[${PYTHON_USEDEP}]
-	dev-python/typing-extensions[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	dev-python/cython[${PYTHON_USEDEP}]
-	test? (
-		!!dev-python/pytest-aiohttp
-		app-arch/brotli[python,${PYTHON_USEDEP}]
-		dev-python/async_generator[${PYTHON_USEDEP}]
-		dev-python/freezegun[${PYTHON_USEDEP}]
-		www-servers/gunicorn[${PYTHON_USEDEP}]
-		dev-python/pytest-forked[${PYTHON_USEDEP}]
-		dev-python/pytest-mock[${PYTHON_USEDEP}]
-		dev-python/pytest-timeout[${PYTHON_USEDEP}]
-		dev-python/pytest-xdist[${PYTHON_USEDEP}]
-		dev-python/re-assert[${PYTHON_USEDEP}]
-		dev-python/trustme[${PYTHON_USEDEP}]
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}"/aiohttp-3.7.4-brotli.patch
-	"${FILESDIR}"/aiohttp-3.7.4-fix-py3.10.patch
-)
-
-DOCS=( CHANGES.rst CONTRIBUTORS.txt README.rst )
-
-distutils_enable_tests pytest
-distutils_enable_sphinx docs \
-	'>=dev-python/alabaster-0.6.2' \
-	'dev-python/sphinxcontrib-asyncio' \
-	'dev-python/sphinxcontrib-blockdiag' \
-	'dev-python/sphinxcontrib-newsfeed' \
-	'dev-python/sphinxcontrib-spelling' \
-	'dev-python/sphinx' \
-	'dev-python/sphinx-aiohttp-theme'
-
-python_prepare_all() {
-	# newer chardet works too
-	sed -e 's|chardet>=2.0,<4.0|chardet>=2.0|' \
-		-i setup.py aiohttp.egg-info/requires.txt || die
-
-	# takes a very long time, then fails
-	rm tests/test_pytest_plugin.py || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_test() {
-	local deselect=(
-		# fails with a 'runtime warning'
-		'tests/test_client_functional.py::test_aiohttp_request_coroutine[pyloop]'
-
-		# fragile to test paths
-		tests/test_route_def.py::test_static
-
-		# requires Internet
-		tests/test_formdata.py::test_mark_formdata_as_processed
-
-		# 'Event loop is closed' -- probably broken by old age
-		'tests/test_streams.py::TestDataQueue::test_read[pyloop]'
-		'tests/test_streams.py::TestDataQueue::test_read_eof[pyloop]'
-		'tests/test_streams.py::TestDataQueue::test_read_cancelled[pyloop]'
-		'tests/test_streams.py::TestDataQueue::test_read_until_eof[pyloop]'
-		'tests/test_streams.py::TestDataQueue::test_read_exc[pyloop]'
-		'tests/test_streams.py::TestDataQueue::test_read_exception[pyloop]'
-		'tests/test_streams.py::TestDataQueue::test_read_exception_with_data[pyloop]'
-		'tests/test_streams.py::TestDataQueue::test_read_exception_on_wait[pyloop]'
-		'tests/test_streams.py::TestDataQueue::test_exception_waiter[pyloop]'
-	)
-
-	[[ ${EPYTHON} == pypy3 ]] && deselect+=(
-		# fails with a 'runtime warning'
-		tests/test_multipart.py::TestPartReader::test_read_boundary_with_incomplete_chunk
-	)
-
-	pushd "${BUILD_DIR}/lib" >/dev/null || die
-	ln -snf "${S}"/{LICENSE.txt,tests} . || die
-	epytest -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" --forked \
-		${deselect[@]/#/--deselect } tests
-	rm -rf .hypothesis .pytest_cache tests || die
-	popd >/dev/null || die
-}

diff --git a/dev-python/aiohttp/aiohttp-3.8.0.ebuild b/dev-python/aiohttp/aiohttp-3.8.0.ebuild
deleted file mode 100644
index 4e466d1f5b0c..000000000000
--- a/dev-python/aiohttp/aiohttp-3.8.0.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
-
-inherit distutils-r1 multiprocessing
-
-DESCRIPTION="http client/server for asyncio"
-HOMEPAGE="
-	https://pypi.org/project/aiohttp/
-	https://github.com/aio-libs/aiohttp/"
-SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~riscv sparc x86"
-
-RDEPEND="
-	app-arch/brotli[python,${PYTHON_USEDEP}]
-	>=dev-python/aiosignal-1.1.2[${PYTHON_USEDEP}]
-	>=dev-python/async_timeout-4.0.0_alpha3[${PYTHON_USEDEP}]
-	>=dev-python/attrs-17.3.0[${PYTHON_USEDEP}]
-	>=dev-python/charset_normalizer-2.0[${PYTHON_USEDEP}]
-	>=dev-python/frozenlist-1.1.1[${PYTHON_USEDEP}]
-	>=dev-python/multidict-4.5.0[${PYTHON_USEDEP}]
-	>=dev-python/yarl-1.0[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	test? (
-		app-arch/brotli[python,${PYTHON_USEDEP}]
-		dev-python/async_generator[${PYTHON_USEDEP}]
-		dev-python/freezegun[${PYTHON_USEDEP}]
-		www-servers/gunicorn[${PYTHON_USEDEP}]
-		dev-python/pytest-forked[${PYTHON_USEDEP}]
-		dev-python/pytest-mock[${PYTHON_USEDEP}]
-		dev-python/pytest-xdist[${PYTHON_USEDEP}]
-		dev-python/re-assert[${PYTHON_USEDEP}]
-		dev-python/trustme[${PYTHON_USEDEP}]
-	)
-"
-
-DOCS=( CHANGES.rst CONTRIBUTORS.txt README.rst )
-
-distutils_enable_tests pytest
-distutils_enable_sphinx docs \
-	'>=dev-python/alabaster-0.6.2' \
-	'dev-python/sphinxcontrib-asyncio' \
-	'dev-python/sphinxcontrib-blockdiag' \
-	'dev-python/sphinxcontrib-newsfeed' \
-	'dev-python/sphinxcontrib-spelling' \
-	'dev-python/sphinx' \
-	'dev-python/sphinx-aiohttp-theme'
-
-# TODO: re-cythonize modules?
-
-src_prepare() {
-	local PATCHES=(
-		"${FILESDIR}"/${P}-examples.patch
-	)
-
-	# increate a little the timeout
-	sed -e '/abs_tol=/s/0.001/0.01/' -i tests/test_helpers.py || die
-
-	# xfail_strict fails on py3.10
-	sed -i -e '/--cov/d' -e '/xfail_strict/d' setup.cfg || die
-	distutils-r1_src_prepare
-}
-
-python_test() {
-	local EPYTEST_IGNORE=(
-		# proxy is not packaged
-		tests/test_proxy_functional.py
-	)
-
-	local EPYTEST_DESELECT=(
-		# runtime warnings
-		'tests/test_client_functional.py::test_aiohttp_request_coroutine[pyloop]'
-		# Internet
-		tests/test_client_session.py::test_client_session_timeout_zero
-	)
-
-	[[ ${EPYTHON} == pypy3 ]] && EPYTEST_DESELECT+=(
-		# C extensions are not used on PyPy3
-		tests/test_http_parser.py::test_c_parser_loaded
-	)
-
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	local -x PYTEST_PLUGINS=pytest_mock,xdist.plugin,pytest_forked
-	mv aiohttp aiohttp.hidden || die
-	epytest -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")" --forked
-	mv aiohttp.hidden aiohttp || die
-}

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
-


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/aiohttp/, dev-python/aiohttp/files/
@ 2023-12-10 15:01 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2023-12-10 15:01 UTC (permalink / raw
  To: gentoo-commits

commit:     0482e646047d37536afc26291d6374b31ec03550
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 10 14:24:38 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 10 14:24:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0482e646

dev-python/aiohttp: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/aiohttp/Manifest                        |   2 -
 dev-python/aiohttp/aiohttp-3.8.6-r1.ebuild         | 111 -------------------
 dev-python/aiohttp/aiohttp-3.9.0.ebuild            | 117 ---------------------
 .../aiohttp/files/aiohttp-3.8.6-brotlicffi.patch   |  46 --------
 4 files changed, 276 deletions(-)

diff --git a/dev-python/aiohttp/Manifest b/dev-python/aiohttp/Manifest
index f952f78c491e..ea185863d65a 100644
--- a/dev-python/aiohttp/Manifest
+++ b/dev-python/aiohttp/Manifest
@@ -1,3 +1 @@
-DIST aiohttp-3.8.6.tar.gz 7352172 BLAKE2B 4dc602abb4f9bd7c65bda7d11cde3e703bbc7786fb3f8ef36922caef42912b2c10a198ebdcecd3fcd022c3a9a729766a2023636f756a8fa10663bf988554f967 SHA512 43f1dd6670d90aefee7f0f30411b13c643ea684815b493cc4437e5f1981f4fdf4b718a40543d7c3c8c70d8b27470b8f3bf1609e46146362e0490ce0990a057f5
-DIST aiohttp-3.9.0.tar.gz 7475063 BLAKE2B 0447b9b095b3004b16eef37bd4d815f864dbfad7efb3021cb97676487cdf6d3007de47cb80daa773cc645ca60b21c79768fdc7a15163bb60578b4d05e17db924 SHA512 3001ea211985c26aa4f8a20210d80d6e72a904c1ea93a5aed5d08eb191dd253155ec5a44ae14d961c6ebbc747cbc8e602866ee7eb0b8963cf783a68dcf8b3ba6
 DIST aiohttp-3.9.1.tar.gz 7482118 BLAKE2B 2150ae98f799f9c6e1f48987bfd8b1847439d8b87cd21417676c2fa5c971fcdc13c3f933dfdd5eceb92b47ad604d16c2a71d884118d8bde1816f2d944d2930a2 SHA512 3288085d5fbcfb7e3664f906345aeab6f989f2318babae6bf5cc3955de48707e9de56ce3b9553d6ee35c72b8f884dc1fd01861a638ee738573e78a203e6a9dec

diff --git a/dev-python/aiohttp/aiohttp-3.8.6-r1.ebuild b/dev-python/aiohttp/aiohttp-3.8.6-r1.ebuild
deleted file mode 100644
index 87cf0162f94c..000000000000
--- a/dev-python/aiohttp/aiohttp-3.8.6-r1.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
-
-inherit distutils-r1 multiprocessing pypi
-
-DESCRIPTION="HTTP client/server for asyncio"
-HOMEPAGE="
-	https://github.com/aio-libs/aiohttp/
-	https://pypi.org/project/aiohttp/
-"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="test-rust"
-
-RDEPEND="
-	>=dev-python/aiosignal-1.1.2[${PYTHON_USEDEP}]
-	>=dev-python/async-timeout-4.0.0_alpha3[${PYTHON_USEDEP}]
-	>=dev-python/attrs-17.3.0[${PYTHON_USEDEP}]
-	dev-python/brotlicffi[${PYTHON_USEDEP}]
-	<dev-python/charset-normalizer-4[${PYTHON_USEDEP}]
-	>=dev-python/charset-normalizer-2.0[${PYTHON_USEDEP}]
-	>=dev-python/frozenlist-1.1.1[${PYTHON_USEDEP}]
-	>=dev-python/multidict-4.5.0[${PYTHON_USEDEP}]
-	>=dev-python/yarl-1.0[${PYTHON_USEDEP}]
-"
-BDEPEND="
-	dev-python/cython[${PYTHON_USEDEP}]
-	test? (
-		dev-python/freezegun[${PYTHON_USEDEP}]
-		www-servers/gunicorn[${PYTHON_USEDEP}]
-		dev-python/pytest-forked[${PYTHON_USEDEP}]
-		dev-python/pytest-mock[${PYTHON_USEDEP}]
-		dev-python/pytest-xdist[${PYTHON_USEDEP}]
-		dev-python/re-assert[${PYTHON_USEDEP}]
-		test-rust? (
-			dev-python/trustme[${PYTHON_USEDEP}]
-		)
-	)
-"
-
-DOCS=( CHANGES.rst CONTRIBUTORS.txt README.rst )
-
-distutils_enable_tests pytest
-
-src_prepare() {
-	local PATCHES=(
-		"${FILESDIR}/${P}-brotlicffi.patch"
-	)
-
-	# increase the timeout a little
-	sed -e '/abs_tol=/s/0.001/0.01/' -i tests/test_helpers.py || die
-
-	# xfail_strict fails on py3.10
-	sed -i -e '/--cov/d' -e '/xfail_strict/d' setup.cfg || die
-
-	# which(1)... also -Werror, sigh
-	sed -i -e 's:which:command -v:' -e 's:-Werror::' Makefile || die
-
-	distutils-r1_src_prepare
-}
-
-python_configure_all() {
-	# workaround missing files
-	mkdir requirements tools || die
-	> requirements/cython.txt || die
-	> tools/gen.py || die
-	chmod +x tools/gen.py || die
-	# force rehashing first
-	emake requirements/.hash/cython.txt.hash
-	> .update-pip || die
-	> .install-cython || die
-	emake cythonize
-}
-
-python_test() {
-	local EPYTEST_IGNORE=(
-		# proxy is not packaged
-		tests/test_proxy_functional.py
-	)
-
-	local EPYTEST_DESELECT=(
-		# Internet
-		tests/test_client_session.py::test_client_session_timeout_zero
-		# broken by irrelevant deprecation warnings
-		tests/test_circular_imports.py::test_no_warnings
-		# TODO
-		tests/test_client_session.py::test_request_tracing_url_params
-	)
-
-	case ${EPYTHON} in
-		pypy3)
-			# upstream unconditionally blocks building C extensions
-			# on PyPy3 but the test suite needs an explicit switch,
-			# sigh
-			local -x AIOHTTP_NO_EXTENSIONS=1
-			;;
-	esac
-
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	local -x PYTEST_PLUGINS=pytest_mock,xdist.plugin,pytest_forked
-	rm -rf aiohttp || die
-	epytest -n "$(makeopts_jobs)" --forked
-}

diff --git a/dev-python/aiohttp/aiohttp-3.9.0.ebuild b/dev-python/aiohttp/aiohttp-3.9.0.ebuild
deleted file mode 100644
index 43338cff0e79..000000000000
--- a/dev-python/aiohttp/aiohttp-3.9.0.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} pypy3 )
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="HTTP client/server for asyncio"
-HOMEPAGE="
-	https://github.com/aio-libs/aiohttp/
-	https://pypi.org/project/aiohttp/
-"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="test-rust"
-
-RDEPEND="
-	>=dev-python/aiosignal-1.1.2[${PYTHON_USEDEP}]
-	>=dev-python/attrs-17.3.0[${PYTHON_USEDEP}]
-	dev-python/brotlicffi[${PYTHON_USEDEP}]
-	>=dev-python/frozenlist-1.1.1[${PYTHON_USEDEP}]
-	>=dev-python/multidict-4.5.0[${PYTHON_USEDEP}]
-	>=dev-python/yarl-1.0[${PYTHON_USEDEP}]
-	$(python_gen_cond_dep '
-		<dev-python/async-timeout-5[${PYTHON_USEDEP}]
-		>=dev-python/async-timeout-4.0[${PYTHON_USEDEP}]
-	' 3.10)
-"
-BDEPEND="
-	dev-python/cython[${PYTHON_USEDEP}]
-	test? (
-		dev-python/freezegun[${PYTHON_USEDEP}]
-		www-servers/gunicorn[${PYTHON_USEDEP}]
-		dev-python/pytest-forked[${PYTHON_USEDEP}]
-		dev-python/pytest-mock[${PYTHON_USEDEP}]
-		dev-python/pytest-xdist[${PYTHON_USEDEP}]
-		dev-python/re-assert[${PYTHON_USEDEP}]
-		$(python_gen_cond_dep '
-			dev-python/time-machine[${PYTHON_USEDEP}]
-		' 'python3*')
-		test-rust? (
-			dev-python/trustme[${PYTHON_USEDEP}]
-		)
-	)
-"
-
-DOCS=( CHANGES.rst CONTRIBUTORS.txt README.rst )
-
-EPYTEST_XDIST=1
-distutils_enable_tests pytest
-
-src_prepare() {
-	# increase the timeout a little
-	sed -e '/abs=/s/0.001/0.01/' -i tests/test_helpers.py || die
-	# xfail_strict fails on py3.10
-	sed -i -e '/--cov/d' -e '/xfail_strict/d' setup.cfg || die
-	sed -i -e 's:-Werror::' Makefile || die
-
-	distutils-r1_src_prepare
-}
-
-python_configure_all() {
-	# workaround missing files
-	mkdir requirements tools || die
-	> requirements/cython.txt || die
-	> tools/gen.py || die
-	chmod +x tools/gen.py || die
-	# force rehashing first
-	emake requirements/.hash/cython.txt.hash
-	> .update-pip || die
-	> .install-cython || die
-	emake cythonize
-}
-
-python_test() {
-	local EPYTEST_IGNORE=(
-		# proxy is not packaged
-		tests/test_proxy_functional.py
-		# python_on_whales is not packaged
-		tests/autobahn/test_autobahn.py
-	)
-
-	local EPYTEST_DESELECT=(
-		# Internet
-		tests/test_client_session.py::test_client_session_timeout_zero
-		# broken by irrelevant deprecation warnings
-		tests/test_circular_imports.py::test_no_warnings
-		# TODO
-		tests/test_client_session.py::test_request_tracing_url_params
-		# fragile timing test
-		tests/test_imports.py::test_import_time
-		# crash in time-machine
-		# https://github.com/aio-libs/aiohttp/issues/7851
-		# https://github.com/adamchainz/time-machine/issues/403
-		tests/test_cookiejar.py::TestCookieJarSafe::test_max_age
-	)
-
-	case ${EPYTHON} in
-		pypy3)
-			# upstream unconditionally blocks building C extensions
-			# on PyPy3 but the test suite needs an explicit switch,
-			# sigh
-			local -x AIOHTTP_NO_EXTENSIONS=1
-			;;
-	esac
-
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	local -x PYTEST_PLUGINS=pytest_mock,xdist.plugin,pytest_forked
-	rm -rf aiohttp || die
-	epytest --forked
-}

diff --git a/dev-python/aiohttp/files/aiohttp-3.8.6-brotlicffi.patch b/dev-python/aiohttp/files/aiohttp-3.8.6-brotlicffi.patch
deleted file mode 100644
index 20e3c7ea0e5d..000000000000
--- a/dev-python/aiohttp/files/aiohttp-3.8.6-brotlicffi.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 4d60891531637aed2fdc50a5dff4809d7d9b3f32 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Wed, 20 Sep 2023 15:28:37 +0200
-Subject: [PATCH] [3.9] Support brotlicffi alternatively to brotli (#7611)
- (#7620)
-
----
- aiohttp/http_parser.py    | 5 ++++-
- tests/test_http_parser.py | 5 ++++-
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/aiohttp/http_parser.py b/aiohttp/http_parser.py
-index 91e01f43..521ff5db 100644
---- a/aiohttp/http_parser.py
-+++ b/aiohttp/http_parser.py
-@@ -49,7 +49,10 @@ else:
-     from typing_extensions import Literal
- 
- try:
--    import brotli
-+    try:
-+        import brotlicffi as brotli
-+    except ImportError:
-+        import brotli
- 
-     HAS_BROTLI = True
- except ImportError:  # pragma: no cover
-diff --git a/tests/test_http_parser.py b/tests/test_http_parser.py
-index 4b185c9e..dc373ea8 100644
---- a/tests/test_http_parser.py
-+++ b/tests/test_http_parser.py
-@@ -21,7 +21,10 @@ from aiohttp.http_parser import (
- )
- 
- try:
--    import brotli
-+    try:
-+        import brotlicffi as brotli
-+    except ImportError:
-+        import brotli
- except ImportError:
-     brotli = None
- 
--- 
-2.42.0
-


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/aiohttp/, dev-python/aiohttp/files/
@ 2024-08-08 15:22 Michał Górny
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2024-08-08 15:22 UTC (permalink / raw
  To: gentoo-commits

commit:     37709f02f65d2e6161240866b180b953a455b3a6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Aug  8 15:21:37 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Aug  8 15:22:09 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37709f02

dev-python/aiohttp: Backport py3.13 fixes

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 ...http-3.10.1.ebuild => aiohttp-3.10.1-r1.ebuild} | 20 ++---
 .../aiohttp/files/aiohttp-3.10.1-py313.patch       | 97 ++++++++++++++++++++++
 2 files changed, 106 insertions(+), 11 deletions(-)

diff --git a/dev-python/aiohttp/aiohttp-3.10.1.ebuild b/dev-python/aiohttp/aiohttp-3.10.1-r1.ebuild
similarity index 87%
rename from dev-python/aiohttp/aiohttp-3.10.1.ebuild
rename to dev-python/aiohttp/aiohttp-3.10.1-r1.ebuild
index bcb2187e0df5..3a7db9402219 100644
--- a/dev-python/aiohttp/aiohttp-3.10.1.ebuild
+++ b/dev-python/aiohttp/aiohttp-3.10.1-r1.ebuild
@@ -40,6 +40,7 @@ BDEPEND="
 		dev-python/freezegun[${PYTHON_USEDEP}]
 		www-servers/gunicorn[${PYTHON_USEDEP}]
 		dev-python/pytest-mock[${PYTHON_USEDEP}]
+		dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
 		dev-python/pytest-xdist[${PYTHON_USEDEP}]
 		dev-python/re-assert[${PYTHON_USEDEP}]
 		$(python_gen_cond_dep '
@@ -57,6 +58,12 @@ EPYTEST_XDIST=1
 distutils_enable_tests pytest
 
 src_prepare() {
+	local PATCHES=(
+		# https://github.com/aio-libs/aiohttp/pull/8623
+		# https://github.com/aio-libs/aiohttp/pull/8648
+		"${FILESDIR}/${P}-py313.patch"
+	)
+
 	# increase the timeout a little
 	sed -e '/abs=/s/0.001/0.01/' -i tests/test_helpers.py || die
 	# xfail_strict fails on py3.10
@@ -101,20 +108,11 @@ python_test() {
 			# sigh
 			local -x AIOHTTP_NO_EXTENSIONS=1
 			;;
-		python3.13)
-			EPYTEST_DESELECT+=(
-				# buggy test
-				# https://github.com/aio-libs/aiohttp/issues/8551
-				tests/test_web_urldispatcher.py::test_access_mock_special_resource
-				# new test (so not a regression)
-				# https://github.com/aio-libs/aiohttp/issues/8565
-				tests/test_web_urldispatcher.py::test_access_symlink_loop
-			)
-			;;
 	esac
 
 	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
 	local -x PYTEST_PLUGINS=pytest_mock,xdist.plugin
 	rm -rf aiohttp || die
-	epytest -m "not internal and not dev_mode"
+	epytest -m "not internal and not dev_mode" \
+		-p rerunfailures --reruns=5
 }

diff --git a/dev-python/aiohttp/files/aiohttp-3.10.1-py313.patch b/dev-python/aiohttp/files/aiohttp-3.10.1-py313.patch
new file mode 100644
index 000000000000..03299a43a3c5
--- /dev/null
+++ b/dev-python/aiohttp/files/aiohttp-3.10.1-py313.patch
@@ -0,0 +1,97 @@
+From 02961d854c8f4277219699cd66970d1e90b371d4 Mon Sep 17 00:00:00 2001
+From: Steve Repsher <steverep@users.noreply.github.com>
+Date: Wed, 7 Aug 2024 07:51:50 -0400
+Subject: [PATCH] Fix monkey patches for pathlib changes in Python 3.13 (#8619)
+
+(cherry picked from commit d1c8dfbb11ea9989446e295fcee350255d5461c0)
+---
+ CHANGES/8551.contrib.rst        | 1 +
+ tests/test_web_urldispatcher.py | 8 ++++----
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+ create mode 100644 CHANGES/8551.contrib.rst
+
+diff --git a/tests/test_web_urldispatcher.py b/tests/test_web_urldispatcher.py
+index a799f4ba146..de44ea0648c 100644
+--- a/tests/test_web_urldispatcher.py
++++ b/tests/test_web_urldispatcher.py
+@@ -434,10 +434,10 @@ def mock_iterdir(self: pathlib.Path) -> Generator[pathlib.Path, None, None]:
+             raise PermissionError()
+         return real_iterdir(self)
+ 
+-    def mock_is_dir(self: pathlib.Path) -> bool:
++    def mock_is_dir(self: pathlib.Path, **kwargs: Any) -> bool:
+         if my_dir.samefile(self.parent):
+             raise PermissionError()
+-        return real_is_dir(self)
++        return real_is_dir(self, **kwargs)
+ 
+     monkeypatch.setattr("pathlib.Path.iterdir", mock_iterdir)
+     monkeypatch.setattr("pathlib.Path.is_dir", mock_is_dir)
+@@ -554,8 +554,8 @@ async def test_access_mock_special_resource(
+     real_result = my_special.stat()
+     real_stat = pathlib.Path.stat
+ 
+-    def mock_stat(self: pathlib.Path) -> os.stat_result:
+-        s = real_stat(self)
++    def mock_stat(self: pathlib.Path, **kwargs: Any) -> os.stat_result:
++        s = real_stat(self, **kwargs)
+         if os.path.samestat(s, real_result):
+             mock_mode = S_IFIFO | S_IMODE(s.st_mode)
+             s = os.stat_result([mock_mode] + list(s)[1:])
+From 75ff8e12d0c95af9347bb16de785d028930f7228 Mon Sep 17 00:00:00 2001
+From: Steve Repsher <steverep@users.noreply.github.com>
+Date: Thu, 8 Aug 2024 10:55:35 -0400
+Subject: [PATCH] Fix response to circular symlinks with Python v3.13 (#8642)
+
+Co-authored-by: J. Nick Koston <nick@koston.org>
+(cherry picked from commit e494277110e40fb5c1cc65a1558dfea7d8ae7ca8)
+---
+ CHANGES/8565.bugfix.rst      | 1 +
+ aiohttp/web_fileresponse.py  | 4 +++-
+ aiohttp/web_urldispatcher.py | 9 +++++----
+ 3 files changed, 9 insertions(+), 5 deletions(-)
+ create mode 100644 CHANGES/8565.bugfix.rst
+
+diff --git a/aiohttp/web_fileresponse.py b/aiohttp/web_fileresponse.py
+index 7fc5b3d787f..d8bbbe08993 100644
+--- a/aiohttp/web_fileresponse.py
++++ b/aiohttp/web_fileresponse.py
+@@ -191,7 +191,9 @@ async def prepare(self, request: "BaseRequest") -> Optional[AbstractStreamWriter
+             file_path, st, file_encoding = await loop.run_in_executor(
+                 None, self._get_file_path_stat_encoding, accept_encoding
+             )
+-        except FileNotFoundError:
++        except OSError:
++            # Most likely to be FileNotFoundError or OSError for circular
++            # symlinks in python >= 3.13, so respond with 404.
+             self.set_status(HTTPNotFound.status_code)
+             return await super().prepare(request)
+ 
+diff --git a/aiohttp/web_urldispatcher.py b/aiohttp/web_urldispatcher.py
+index 688946626fd..558fb7d0c9b 100644
+--- a/aiohttp/web_urldispatcher.py
++++ b/aiohttp/web_urldispatcher.py
+@@ -80,9 +80,9 @@
+     BaseDict = dict
+ 
+ CIRCULAR_SYMLINK_ERROR = (
+-    OSError
++    (OSError,)
+     if sys.version_info < (3, 10) and sys.platform.startswith("win32")
+-    else RuntimeError
++    else (RuntimeError,) if sys.version_info < (3, 13) else ()
+ )
+ 
+ YARL_VERSION: Final[Tuple[int, ...]] = tuple(map(int, yarl_version.split(".")[:2]))
+@@ -694,8 +694,9 @@ def _resolve_path_to_response(self, unresolved_path: Path) -> StreamResponse:
+             else:
+                 file_path = unresolved_path.resolve()
+                 file_path.relative_to(self._directory)
+-        except (ValueError, CIRCULAR_SYMLINK_ERROR) as error:
+-            # ValueError for relative check; RuntimeError for circular symlink.
++        except (ValueError, *CIRCULAR_SYMLINK_ERROR) as error:
++            # ValueError is raised for the relative check. Circular symlinks
++            # raise here on resolving for python < 3.13.
+             raise HTTPNotFound() from error
+ 
+         # if path is a directory, return the contents if permitted. Note the


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-08 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-01 11:40 [gentoo-commits] repo/gentoo:master commit in: dev-python/aiohttp/, dev-python/aiohttp/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2024-08-08 15:22 Michał Górny
2023-12-10 15:01 Michał Górny
2022-01-20 14:20 Michał Górny
2021-07-29 18:47 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox