Compare commits

4 Commits

Author SHA256 Message Date
d7d9cbd0dd Accepting request 1231983 from devel:languages:python
- Add patch support-new-httpx.patch:
  * Support argument changes with httpx 0.28.0+.

OBS-URL: https://build.opensuse.org/request/show/1231983
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-zeep?expand=0&rev=11
2024-12-19 20:40:49 +00:00
8699849be9 - Add patch support-new-httpx.patch:
* Support argument changes with httpx 0.28.0+.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zeep?expand=0&rev=22
2024-12-19 05:33:09 +00:00
cd409596c8 Accepting request 1223763 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1223763
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-zeep?expand=0&rev=10
2024-11-13 14:28:33 +00:00
ac67ad7d26 Accepting request 1223633 from home:nkrapp:branches:devel:languages:python
- Update to 4.3.1
  * Fix regression in parsing xsd:Date with negative timezone
- Update to 4.3.0
  * Drop support for Python 3.7 and 3.8 and add support for 
    Python 3.12 and 3.13 (#1421, #1408)
  * Add workaround to support date values with timezone in 
    combination with
  * isodate 0.7.2 (#1431)
  * Replace deprecated datetime.datetime.utcnow()
  * Properly close 'file://' resources (#1339)
  * Complete migration to pyproject.toml (remove setup.py)

OBS-URL: https://build.opensuse.org/request/show/1223633
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zeep?expand=0&rev=20
2024-11-12 17:11:54 +00:00
5 changed files with 161 additions and 9 deletions

View File

@@ -1,3 +1,24 @@
-------------------------------------------------------------------
Thu Dec 19 05:32:24 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-new-httpx.patch:
* Support argument changes with httpx 0.28.0+.
-------------------------------------------------------------------
Tue Nov 12 10:48:13 UTC 2024 - Nico Krapp <nico.krapp@suse.com>
- Update to 4.3.1
* Fix regression in parsing xsd:Date with negative timezone
- Update to 4.3.0
* Drop support for Python 3.7 and 3.8 and add support for
Python 3.12 and 3.13 (#1421, #1408)
* Add workaround to support date values with timezone in
combination with
* isodate 0.7.2 (#1431)
* Replace deprecated datetime.datetime.utcnow()
* Properly close 'file://' resources (#1339)
* Complete migration to pyproject.toml (remove setup.py)
-------------------------------------------------------------------
Fri Dec 15 06:34:59 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-zeep
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,9 +16,8 @@
#
%define skip_python2 1
Name: python-zeep
Version: 4.2.1
Version: 4.3.1
Release: 0
Summary: A Python SOAP client based on lxml/requests
License: MIT
@@ -26,13 +25,14 @@ URL: http://docs.python-zeep.org
Source: https://files.pythonhosted.org/packages/source/z/zeep/zeep-%{version}.tar.gz
# PATCH-FIX-OPENSUSE xfail tests that require network access
Patch0: xfail-network-tests.patch
# PATCH-FIX-UPSTREAM gh#mvantellingen/python-zeep#1447
Patch1: support-new-httpx.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-attrs >= 17.2.0
Requires: python-cached-property >= 1.3.0
Requires: python-isodate >= 0.5.4
Requires: python-lxml >= 4.6.0
Requires: python-platformdirs >= 1.4.0
@@ -40,6 +40,8 @@ Requires: python-pytz
Requires: python-requests >= 2.7.0
Requires: python-requests-file >= 1.5.1
Requires: python-requests-toolbelt >= 0.7.1
Recommends: python-httpx >= 0.15.0
Recommends: python-packaging
Recommends: python-xmlsec >= 0.6.1
BuildArch: noarch
# SECTION test requirements
@@ -47,10 +49,10 @@ BuildRequires: %{python_module platformdirs >= 1.4.0}
BuildRequires: %{python_module aiohttp >= 1.0}
BuildRequires: %{python_module aioresponses >= 0.4.1}
BuildRequires: %{python_module attrs >= 17.2.0}
BuildRequires: %{python_module cached-property >= 1.3.0}
BuildRequires: %{python_module freezegun >= 0.3.15}
BuildRequires: %{python_module isodate >= 0.5.4}
BuildRequires: %{python_module lxml >= 4.6.0}
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pretend >= 1.0.9}
BuildRequires: %{python_module pytest >= 6.0.1}
BuildRequires: %{python_module pytest-asyncio}
@@ -83,7 +85,7 @@ export LANG=en_US.UTF-8
%pytest tests
%files %{python_files}
%doc CHANGES README.rst
%doc CHANGES README.md
%license LICENSE
%{python_sitelib}/zeep
%{python_sitelib}/zeep-%{version}.dist-info

129
support-new-httpx.patch Normal file
View File

@@ -0,0 +1,129 @@
From 4e2568574271e5e37de5e5c86e4bb12a5e661c6b Mon Sep 17 00:00:00 2001
From: aschollmeier-gcmlp <aschollmeier@gcmlp.com>
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(-)
diff --git a/src/zeep/transports.py b/src/zeep/transports.py
index 2a1ee8bd..0cbb05f2 100644
--- a/src/zeep/transports.py
+++ b/src/zeep/transports.py
@@ -183,15 +183,17 @@ def __init__(
self._close_session = False
self.cache = cache
+ proxy_kwarg_name = "proxy" if httpx.__version__ >= "0.26.0" else "proxies"
+ proxy_kwargs = {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__)
From 411ea4ef7ec4d160dd2cb2d29288c9d34466f286 Mon Sep 17 00:00:00 2001
From: aschollmeier-gcmlp <aschollmeier@gcmlp.com>
Date: Sat, 14 Dec 2024 09:34:53 -0600
Subject: [PATCH 2/3] Correct httpx version comparison
---
pyproject.toml | 5 ++++-
src/zeep/transports.py | 19 +++++++++++++++----
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index c151100a..414e83c2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -53,7 +53,10 @@ test = [
"flake8-debugger==4.1.2",
"flake8-imports==0.1.1",
]
-async = ["httpx>=0.15.0"]
+async = [
+ "httpx>=0.15.0",
+ "packaging",
+]
xmlsec = ["xmlsec>=0.6.1"]
[build-system]
diff --git a/src/zeep/transports.py b/src/zeep/transports.py
index 0cbb05f2..f1b00565 100644
--- a/src/zeep/transports.py
+++ b/src/zeep/transports.py
@@ -16,6 +16,15 @@
except ImportError:
httpx = None
+try:
+ from packaging.version import Version
+ if Version(httpx.__version__) >= Version("0.26.0"):
+ HTTPX_PROXY_KWARG_NAME = "proxy"
+ else:
+ HTTPX_PROXY_KWARG_NAME = "proxies"
+except ImportError:
+ Version = None
+ HTTPX_PROXY_KWARG_NAME = None
__all__ = ["AsyncTransport", "Transport"]
@@ -178,13 +187,15 @@ def __init__(
verify_ssl=True,
proxy=None,
):
- if httpx is None:
- raise RuntimeError("The AsyncTransport is based on the httpx module")
+ if httpx is None or HTTPX_PROXY_KWARG_NAME is None:
+ raise RuntimeError(
+ "To use AsyncTransport, install zeep with the async extras, "
+ "e.g., `pip install zeep[async]`"
+ )
self._close_session = False
self.cache = cache
- proxy_kwarg_name = "proxy" if httpx.__version__ >= "0.26.0" else "proxies"
- proxy_kwargs = {proxy_kwarg_name: proxy}
+ proxy_kwargs = {HTTPX_PROXY_KWARG_NAME: proxy}
self.wsdl_client = wsdl_client or httpx.Client(
verify=verify_ssl,
timeout=timeout,
From c20b7ba21d815377cb5d5095eb9e9f5918fb678d Mon Sep 17 00:00:00 2001
From: aschollmeier-gcmlp <aschollmeier@gcmlp.com>
Date: Sat, 14 Dec 2024 10:00:17 -0600
Subject: [PATCH 3/3] Avoid potential AttributeError in httpx version check
---
src/zeep/transports.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/zeep/transports.py b/src/zeep/transports.py
index f1b00565..d2136373 100644
--- a/src/zeep/transports.py
+++ b/src/zeep/transports.py
@@ -18,10 +18,10 @@
try:
from packaging.version import Version
- if Version(httpx.__version__) >= Version("0.26.0"):
- HTTPX_PROXY_KWARG_NAME = "proxy"
- else:
+ 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

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:72093acfdb1d8360ed400869b73fbf1882b95c4287f798084c42ee0c1ff0e425
size 161072

3
zeep-4.3.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f45385e9e1b09d5550e0f51ab9fa7c6842713cab7194139372fd82a99c56a06e
size 166468