summaryrefslogtreecommitdiff
path: root/dev-python/aiohttp
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-09 11:04:53 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-09 11:04:53 +0100
commit43297a4ed0a3760bbdd0b8c286b779f174ca5368 (patch)
tree15b92efd455b5d5eb0ef8a4af4f5f24572c4b46b /dev-python/aiohttp
parent14866757225815b9374acfc8453518951e0f910d (diff)
gentoo auto-resync : 09:08:2024 - 11:04:52
Diffstat (limited to 'dev-python/aiohttp')
-rw-r--r--dev-python/aiohttp/Manifest7
-rw-r--r--dev-python/aiohttp/aiohttp-3.10.1-r1.ebuild (renamed from dev-python/aiohttp/aiohttp-3.10.0.ebuild)20
-rw-r--r--dev-python/aiohttp/aiohttp-3.10.2.ebuild (renamed from dev-python/aiohttp/aiohttp-3.10.1.ebuild)16
-rw-r--r--dev-python/aiohttp/files/aiohttp-3.10.1-py313.patch97
4 files changed, 114 insertions, 26 deletions
diff --git a/dev-python/aiohttp/Manifest b/dev-python/aiohttp/Manifest
index 07c39ab82eaa..5b16918d1d36 100644
--- a/dev-python/aiohttp/Manifest
+++ b/dev-python/aiohttp/Manifest
@@ -1,7 +1,8 @@
-DIST aiohttp-3.10.0.tar.gz 7517100 BLAKE2B ce37d40e94ef836ae63a56b1b01251a34a07c469120393f8006964f54eea5f27cd4277fb0f69174cf652e52fbb0d77cda53ffe41c785922717defde2df873dd9 SHA512 69c8eaed5738c11ea994b64dcf75cbc5950b1cc4705ac40df80ad3311dceb1d25c15019527e32e9345a4677882e103a7c25dedc0dc99d874102a73771d6cfde9
+AUX aiohttp-3.10.1-py313.patch 4308 BLAKE2B d0918ad9a95be126b4e0b3baeb8578979bc9fdccbd60f2842d18f291b395ce0cce3c4f1e976d1a03d727510d2d27a2c7675e0aebefb11a3c11ae7dd2b240d7c0 SHA512 156be6ef7636f59f538f76980067dc126698dd669a854e69a235a7828f19414c56bb07cc4980b0c340401d7bf2246639c709fd251b7da39dbe1d4cc27eca702a
DIST aiohttp-3.10.1.tar.gz 7517572 BLAKE2B 4400cbda0997f3602ace4aae7ba153dcb515d49d8d3431fab087ebba3126d8fa82121998b1d8e36e2b86c9144a5c124ac16c12520cd47fea7956e6c04e2b4e55 SHA512 59f743ce7821b46da531eb576bbf20409407726b6ba78be9615f715ab2404cc3668120d2ec1566dcab7017ba36bf1753a3365b81097da53685c93ba013c3c94a
+DIST aiohttp-3.10.2.tar.gz 7520621 BLAKE2B a8e44ba6292e614ac9a7b15649a9838e354ca17bb14df61ccf9b1f2c0ce647e5786933701c85105a493b11e6a4c3edcb80e6ba43a501c4600a3b7b699c5c64f6 SHA512 61baa7a264a2bf38624a339b8e0ddc066aba7cb3da13d8e24fc705d4bf098796f198354c7b913a12ee3c8bc0c5468313432dad51f343c8dfc8efef020b385c88
DIST aiohttp-3.9.5.tar.gz 7504841 BLAKE2B f051ee88d45952219f72d542f1c6d0cc33c699c6c5fb5dbe3bc054ee4d0e03121b219c8c8524fd1236a8b878329b0997b8afe07d6c66074102d4a2052a8738ff SHA512 da11468a2f131275593395b052700a99cf79055a32d48327dca0f58547ad30add8cd0a375dbd831e2f06fe7a739183251e4ad69c16f3d141799bbed45a8a5dc4
-EBUILD aiohttp-3.10.0.ebuild 3163 BLAKE2B ca3f4e48f03f5f629d940019001f96223dbc0e56929e143602f7ecf815db1fcfbf695b5b56d6f270676c73a4e5c60068ba1102e6d978cfae0d8202a0a06a29c1 SHA512 450f7437383eb87064171bbf9caee56fdd6c6c179f45807dd667ddf022f232621932cc8f40d05fe472d3f4089cd696c6f4d242fcb61df92c0aa52a9e045bb77d
-EBUILD aiohttp-3.10.1.ebuild 3145 BLAKE2B 27a43f2bd79aeb3b3d06afbf47b26200016f39f578ade82ff11a6ecec1ba3942f377707422d44955bf7f80537a82c11082ad6b85a3cb4a148b8e715108f6ded2 SHA512 ca83b78a7d52469fabbbfe1bf94bea1fa579837b39c754b9bf93d254c63172f66ed1869238a75ddc1943d8f22e20df3162c3c32e12cc9126ae1c8644e9b8e2c8
+EBUILD aiohttp-3.10.1-r1.ebuild 3058 BLAKE2B 132253ae71ad6684a0c694853d39ed495783b8bbe0ed00b1934da972d59ef73c980b184ca051e2b70e21690b5caa1a2230126e80ec510307a32e6142cebe426f SHA512 c9b0441196af7c81ddaddc4a9a70bb94b60391de2e2df743d49a21b32deeb6f7e404ed85ca85454c192a0531b5823f750f06767b0d50a04c74a77703335876f0
+EBUILD aiohttp-3.10.2.ebuild 2904 BLAKE2B 572b4f47a26e089a5b30fed1bf9a9cb6861a6ae94610bae747a477f6d0a274070a215e4f3e0e83cb8f72f6176958c3ba62f213dc2210540118257e040a64bdf3 SHA512 81beab554cf7a48a4dfcc76b66f785528be37de044ca1cec43d71cc65d7577dbd30af7647ff793e762812e7be03ab84ac9d627f223e073118a4fcc19995b786a
EBUILD aiohttp-3.9.5.ebuild 2884 BLAKE2B ca63f65e2f9893741e3a61956ebf0d80d71a0005e86467fceabfe781431e2afbbd103e286839b3a59516419502c71aa365f4d198b774f6ef956ef7afbd344474 SHA512 66a8ff411e3377b8655202ef0a7d0ee42be1aea52a5634e72c6435538d811772c5599a23464f44fb8ee58f52e34784e4f8e290ed2003fe2d18580fd422536b0b
MISC metadata.xml 490 BLAKE2B 5233af0b5e2668b1eb62278b05b62f24f1ab90f6d05b20dd9f1c5b54b846919c3fa28b843df28f5bfa320996d46de0e74c7a28bd0bef02aaaca14b1cec52baba SHA512 9b701c5c5a22b6aa94977a67bc40f3dc9df8337556952658a2a17ecaaa471cd7f7b5b8bf3a0088208087677555f0cbb8760c091b03b96ee70affe3e2b84cf6d5
diff --git a/dev-python/aiohttp/aiohttp-3.10.0.ebuild b/dev-python/aiohttp/aiohttp-3.10.1-r1.ebuild
index bcb2187e0df5..3a7db9402219 100644
--- a/dev-python/aiohttp/aiohttp-3.10.0.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/aiohttp-3.10.1.ebuild b/dev-python/aiohttp/aiohttp-3.10.2.ebuild
index 10fb0fe77ab2..47c2e84f4087 100644
--- a/dev-python/aiohttp/aiohttp-3.10.1.ebuild
+++ b/dev-python/aiohttp/aiohttp-3.10.2.ebuild
@@ -17,7 +17,7 @@ HOMEPAGE="
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~riscv ~sparc ~x86"
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="test-rust"
RDEPEND="
@@ -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 '
@@ -101,20 +102,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