From ef1845a143f7325a7aaa3e7210170631807a8c5f6c77612381178eab628b3243 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 19 Dec 2024 06:05:33 +0000 Subject: [PATCH] - Add patch support-new-httpx.patch: * Support new arguments for httpx 0.28.0+ OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-softlayer-zeep?expand=0&rev=15 --- python-softlayer-zeep.changes | 6 ++++ python-softlayer-zeep.spec | 2 ++ support-new-httpx.patch | 65 +++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 support-new-httpx.patch diff --git a/python-softlayer-zeep.changes b/python-softlayer-zeep.changes index 0cde288..3102936 100644 --- a/python-softlayer-zeep.changes +++ b/python-softlayer-zeep.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Dec 19 06:04:42 UTC 2024 - Steve Kowalik + +- Add patch support-new-httpx.patch: + * Support new arguments for httpx 0.28.0+ + ------------------------------------------------------------------- Thu Nov 14 12:18:00 UTC 2024 - Markéta Machová diff --git a/python-softlayer-zeep.spec b/python-softlayer-zeep.spec index fa1a8b9..6807d1a 100644 --- a/python-softlayer-zeep.spec +++ b/python-softlayer-zeep.spec @@ -30,6 +30,8 @@ Source: https://files.pythonhosted.org/packages/source/s/softlayer-zeep/ Patch0: skip-networked-test.patch # PATCH-FIX-UPSTREAM gh#mvantellingen/python-zeep#d1b0257 Fix regression in parsing xsd:Date with negative timezone Patch1: xsd-date.patch +# PATCH-FIX-UPSTREAM Based on gh#mvantellingen/python-zeep#1447 +Patch2: support-new-httpx.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module wheel} BuildRequires: fdupes diff --git a/support-new-httpx.patch b/support-new-httpx.patch new file mode 100644 index 0000000..b1f253d --- /dev/null +++ b/support-new-httpx.patch @@ -0,0 +1,65 @@ +From 4e2568574271e5e37de5e5c86e4bb12a5e661c6b Mon Sep 17 00:00:00 2001 +From: aschollmeier-gcmlp +Date: Wed, 4 Dec 2024 16:34:22 -0600 +Subject: [PATCH 1/3] Update proxy argument in httpx Client/AsyncClient + +Ref: https://github.com/encode/httpx/blob/master/CHANGELOG.md#0260-20th-december-2023 +--- + src/zeep/transports.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +Index: softlayer-zeep-5.0.0/src/zeep/transports.py +=================================================================== +--- softlayer-zeep-5.0.0.orig/src/zeep/transports.py ++++ softlayer-zeep-5.0.0/src/zeep/transports.py +@@ -16,6 +16,15 @@ try: + except ImportError: + httpx = None + ++try: ++ from packaging.version import Version ++ if httpx is None or Version(httpx.__version__) < Version("0.26.0"): ++ HTTPX_PROXY_KWARG_NAME = "proxies" ++ else: ++ HTTPX_PROXY_KWARG_NAME = "proxy" ++except ImportError: ++ Version = None ++ HTTPX_PROXY_KWARG_NAME = None + + __all__ = ["AsyncTransport", "Transport"] + +@@ -182,15 +191,16 @@ class AsyncTransport(Transport): + raise RuntimeError("The AsyncTransport is based on the httpx module") + + self.cache = cache ++ proxy_kwargs = {HTTPX_PROXY_KWARG_NAME: proxy} + self.wsdl_client = wsdl_client or httpx.Client( + verify=verify_ssl, +- proxies=proxy, + timeout=timeout, ++ **proxy_kwargs, + ) + self.client = client or httpx.AsyncClient( + verify=verify_ssl, +- proxies=proxy, + timeout=operation_timeout, ++ **proxy_kwargs, + ) + self.logger = logging.getLogger(__name__) + +Index: softlayer-zeep-5.0.0/setup.py +=================================================================== +--- softlayer-zeep-5.0.0.orig/setup.py ++++ softlayer-zeep-5.0.0/setup.py +@@ -18,7 +18,10 @@ docs_require = [ + "sphinx>=1.4.0", + ] + +-async_require = ["httpx"] ++async_require = [ ++ "httpx", ++ "packaging" ++] + + xmlsec_require = [ + "xmlsec>=0.6.1",