commit: 77f3badc4695509d8a9a795dd05a77e1640f1218 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Fri Jul 11 14:58:47 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Fri Jul 11 15:05:51 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77f3badc
net-analyzer/wapiti: Backport httpx-0.28 fix Closes: https://bugs.gentoo.org/959745 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> net-analyzer/wapiti/files/wapiti-3.1.7-httpx.patch | 51 ++++++++++++++++++++++ ...piti-3.1.7-r1.ebuild => wapiti-3.1.7-r2.ebuild} | 7 ++- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/net-analyzer/wapiti/files/wapiti-3.1.7-httpx.patch b/net-analyzer/wapiti/files/wapiti-3.1.7-httpx.patch new file mode 100644 index 000000000000..9a45bd09c723 --- /dev/null +++ b/net-analyzer/wapiti/files/wapiti-3.1.7-httpx.patch @@ -0,0 +1,51 @@ +From 77fe140f8ad4d2fb266f1b49285479f6af25d6b7 Mon Sep 17 00:00:00 2001 +From: devloop <[email protected]> +Date: Wed, 16 Apr 2025 11:12:08 +0200 +Subject: [PATCH] fix wappalyzer user warnings and deprecation warnings in + other modules + +--- a/wapitiCore/net/crawler.py ++++ b/wapitiCore/net/crawler.py +@@ -22,7 +22,7 @@ + from urllib.parse import urlparse, urlunparse + import warnings + import functools +-from typing import Dict ++from typing import Dict, Optional + import asyncio + import ssl + +@@ -157,7 +157,7 @@ class AsyncCrawler: + headers=headers, + cookies=configuration.cookies, + verify=ssl_context, +- proxies=cls._proxy_url_to_dict(configuration.proxy), ++ proxy=cls._fix_proxy_url(configuration.proxy), + timeout=configuration.timeout, + event_hooks={"request": [drop_cookies_from_request]} if configuration.drop_cookies else None, + ) +@@ -166,10 +166,10 @@ class AsyncCrawler: + return cls(configuration.base_request, client, configuration.timeout) + + @staticmethod +- def _proxy_url_to_dict(proxy: str) -> Dict[str, str]: ++ def _fix_proxy_url(proxy: str) -> Optional[str]: + """Set a proxy to use for HTTP requests.""" + if not proxy: +- return {} ++ return None + + url_parts = urlparse(proxy) + protocol = url_parts.scheme.lower() +@@ -180,10 +180,7 @@ class AsyncCrawler: + if protocol == "socks": + protocol = "socks5" + +- return { +- "http://": urlunparse((protocol, url_parts.netloc, '/', '', '', '')), +- "https://": urlunparse((protocol, url_parts.netloc, '/', '', '', '')), +- } ++ return urlunparse((protocol, url_parts.netloc, '/', '', '', '')) + + @property + def timeout(self): diff --git a/net-analyzer/wapiti/wapiti-3.1.7-r1.ebuild b/net-analyzer/wapiti/wapiti-3.1.7-r2.ebuild similarity index 92% rename from net-analyzer/wapiti/wapiti-3.1.7-r1.ebuild rename to net-analyzer/wapiti/wapiti-3.1.7-r2.ebuild index 9a6fb012834f..53a66aa1f275 100644 --- a/net-analyzer/wapiti/wapiti-3.1.7-r1.ebuild +++ b/net-analyzer/wapiti/wapiti-3.1.7-r2.ebuild @@ -37,7 +37,6 @@ RDEPEND=" >=dev-python/dnspython-2.1.0[${PYTHON_USEDEP}] >=dev-python/h11-0.14[${PYTHON_USEDEP}] >=dev-python/httpx-0.23.3[${PYTHON_USEDEP}] - <=dev-python/httpx-0.28[${PYTHON_USEDEP}] >=dev-python/loguru-0.5.3[${PYTHON_USEDEP}] >=dev-python/mako-1.1.4[${PYTHON_USEDEP}] >=dev-python/markupsafe-2.1.1[${PYTHON_USEDEP}] @@ -63,7 +62,11 @@ BDEPEND=" EPYTEST_PLUGINS=( pytest-asyncio ) distutils_enable_tests pytest -PATCHES=( "${FILESDIR}"/${PN}-3.1.6-setup_scripts.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-3.1.6-setup_scripts.patch + # part of https://github.com/wapiti-scanner/wapiti/commit/77fe140f8ad4d2fb266f1b49285479f6af25d6b7 + "${FILESDIR}"/${P}-httpx.patch +) python_prepare_all() { sed -i 's/--cov --cov-report=xml//' setup.cfg || die
