From 16cf69d9d37d6f47a69369e06e1a3b14e133e029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 6 Sep 2025 17:24:13 +0200 Subject: [PATCH] dev-python/zeep: Backport httpx-0.28 fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/946660 Signed-off-by: Michał Górny --- .../zeep/files/zeep-4.3.1-httpx-0.28.patch | 29 +++++++++++++++++++ ...zeep-4.3.1.ebuild => zeep-4.3.1-r1.ebuild} | 10 +++++-- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 dev-python/zeep/files/zeep-4.3.1-httpx-0.28.patch rename dev-python/zeep/{zeep-4.3.1.ebuild => zeep-4.3.1-r1.ebuild} (86%) diff --git a/dev-python/zeep/files/zeep-4.3.1-httpx-0.28.patch b/dev-python/zeep/files/zeep-4.3.1-httpx-0.28.patch new file mode 100644 index 0000000000000..557c3500caf41 --- /dev/null +++ b/dev-python/zeep/files/zeep-4.3.1-httpx-0.28.patch @@ -0,0 +1,29 @@ +From 750326e549f467c5df170f46d1ae59939dbcce13 Mon Sep 17 00:00:00 2001 +From: Nikolai Korolev +Date: Sat, 16 Aug 2025 00:21:20 +0100 +Subject: [PATCH] Fix zeep for httpx after 0.28.0 + +--- + src/zeep/transports.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/zeep/transports.py b/src/zeep/transports.py +index 2a1ee8bd..4036ecea 100644 +--- a/src/zeep/transports.py ++++ b/src/zeep/transports.py +@@ -185,13 +185,13 @@ def __init__( + self.cache = cache + self.wsdl_client = wsdl_client or httpx.Client( + verify=verify_ssl, +- proxies=proxy, + timeout=timeout, ++ **({"proxies": proxy} if httpx.__version__ < "0.28.0" else {"proxy": proxy}), + ) + self.client = client or httpx.AsyncClient( + verify=verify_ssl, +- proxies=proxy, + timeout=operation_timeout, ++ **({"proxies": proxy} if httpx.__version__ < "0.28.0" else {"proxy": proxy}), + ) + self.logger = logging.getLogger(__name__) + diff --git a/dev-python/zeep/zeep-4.3.1.ebuild b/dev-python/zeep/zeep-4.3.1-r1.ebuild similarity index 86% rename from dev-python/zeep/zeep-4.3.1.ebuild rename to dev-python/zeep/zeep-4.3.1-r1.ebuild index e59f751c3fd44..dc62d1e593471 100644 --- a/dev-python/zeep/zeep-4.3.1.ebuild +++ b/dev-python/zeep/zeep-4.3.1-r1.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..13} ) +PYTHON_COMPAT=( python3_{11..13} ) inherit distutils-r1 pypi @@ -36,11 +36,15 @@ BDEPEND=" dev-python/freezegun[${PYTHON_USEDEP}] >=dev-python/httpx-0.15.0[${PYTHON_USEDEP}] dev-python/pretend[${PYTHON_USEDEP}] - dev-python/pytest-asyncio[${PYTHON_USEDEP}] - dev-python/pytest-httpx[${PYTHON_USEDEP}] dev-python/requests-mock[${PYTHON_USEDEP}] dev-python/xmlsec[${PYTHON_USEDEP}] ) " +EPYTEST_PLUGINS=( pytest-{asyncio,httpx} ) distutils_enable_tests pytest + +PATCHES=( + # https://github.com/mvantellingen/python-zeep/pull/1468 + "${FILESDIR}/${P}-httpx-0.28.patch" +)