17
0

7 Commits

Author SHA256 Message Date
702f63b1bb Accepting request 1232010 from devel:languages:python
- Add patch support-new-httpx.patch:
  * Support new arguments for httpx 0.28.0+

OBS-URL: https://build.opensuse.org/request/show/1232010
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-softlayer-zeep?expand=0&rev=6
2024-12-19 20:40:50 +00:00
ef1845a143 - 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
2024-12-19 06:05:33 +00:00
ebf7649bd3 Accepting request 1224301 from devel:languages:python
- Add xsd-date.patch to fix test failure
- Stop providing/obsoleting python-zeep, as the latter exists in OBS
  and is more up-to-date on a lower version

OBS-URL: https://build.opensuse.org/request/show/1224301
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-softlayer-zeep?expand=0&rev=5
2024-11-15 14:43:04 +00:00
b2b989cbf5 it is still an outdated fork of zeep
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-softlayer-zeep?expand=0&rev=13
2024-11-14 19:28:31 +00:00
45fff20430 Accepting request 1224185 from home:mcalabkova:branches:devel:languages:python
Please see the Slack thread first

- Add xsd-date.patch to fix test failure
- Stop providing/obsoleting python-zeep, as the latter exists in OBS
  and is more up-to-date on a lower version

OBS-URL: https://build.opensuse.org/request/show/1224185
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-softlayer-zeep?expand=0&rev=12
2024-11-14 17:29:02 +00:00
5cf9ca66ed Accepting request 1218911 from devel:languages:python
- Add {Build,}Requires on legacy-cgi to support Python 3.13. 
- Update VCS URL.

OBS-URL: https://build.opensuse.org/request/show/1218911
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-softlayer-zeep?expand=0&rev=4
2024-10-29 13:35:55 +00:00
b6cf463594 - Add {Build,}Requires on legacy-cgi to support Python 3.13.
- Update VCS URL.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-softlayer-zeep?expand=0&rev=10
2024-10-29 05:34:59 +00:00
4 changed files with 142 additions and 6 deletions

View File

@@ -1,3 +1,22 @@
-------------------------------------------------------------------
Thu Dec 19 06:04:42 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- 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á <mmachova@suse.com>
- Add xsd-date.patch to fix test failure
- Stop providing/obsoleting python-zeep, as the latter exists in OBS
and is more up-to-date on a lower version
-------------------------------------------------------------------
Tue Oct 29 05:34:42 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Add {Build,}Requires on legacy-cgi to support Python 3.13.
- Update VCS URL.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 19 13:34:00 UTC 2023 - Matej Cepl <mcepl@cepl.eu> Tue Dec 19 13:34:00 UTC 2023 - Matej Cepl <mcepl@cepl.eu>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-softlayer-zeep # spec file for package python-softlayer-zeep
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,19 +16,22 @@
# #
%global skip_python2 1
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-softlayer-zeep Name: python-softlayer-zeep
Version: 5.0.0 Version: 5.0.0
Release: 0 Release: 0
Summary: A modern/fast Python SOAP client based on lxml / requests Summary: A modern/fast Python SOAP client based on lxml / requests
License: MIT License: MIT
#Git-Clone: https://github.com/mvantellingen/python-zeep #Git-Clone: https://github.com/softlayer/softlayer-zeep
URL: https://docs.python-zeep.org URL: https://docs.python-zeep.org
Source: https://files.pythonhosted.org/packages/source/s/softlayer-zeep/softlayer-zeep-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/s/softlayer-zeep/softlayer-zeep-%{version}.tar.gz
# PATCH-FIX-UPSTREAM skip-networked-test.patch gh#mvantellingen/python-zeep#1402 mcepl@suse.com # PATCH-FIX-UPSTREAM skip-networked-test.patch gh#mvantellingen/python-zeep#1402 mcepl@suse.com
# skip tests requiring network connection # skip tests requiring network connection
Patch0: skip-networked-test.patch 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 pip}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
@@ -41,14 +44,14 @@ Requires: python-pytz
Requires: python-requests >= 2.7.0 Requires: python-requests >= 2.7.0
Requires: python-requests-file >= 1.5.1 Requires: python-requests-file >= 1.5.1
Requires: python-requests-toolbelt >= 0.7.1 Requires: python-requests-toolbelt >= 0.7.1
Provides: python-zeep = %{version} Conflicts: python-zeep
Obsoletes: python-zeep < %{version}
BuildArch: noarch BuildArch: noarch
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module attrs >= 17.2.0} BuildRequires: %{python_module attrs >= 17.2.0}
BuildRequires: %{python_module freezegun >= 0.3.15} BuildRequires: %{python_module freezegun >= 0.3.15}
BuildRequires: %{python_module isodate >= 0.5.4} BuildRequires: %{python_module isodate >= 0.5.4}
BuildRequires: %{python_module isort >= 5.3.2} BuildRequires: %{python_module isort >= 5.3.2}
BuildRequires: %{python_module legacy-cgi >= 2.6}
BuildRequires: %{python_module lxml >= 4.6.0} BuildRequires: %{python_module lxml >= 4.6.0}
BuildRequires: %{python_module platformdirs >= 1.4.0} BuildRequires: %{python_module platformdirs >= 1.4.0}
BuildRequires: %{python_module pretend == 1.0.9} BuildRequires: %{python_module pretend == 1.0.9}
@@ -61,6 +64,9 @@ BuildRequires: %{python_module requests-file >= 1.5.1}
BuildRequires: %{python_module requests-mock >= 0.7.0} BuildRequires: %{python_module requests-mock >= 0.7.0}
BuildRequires: %{python_module requests-toolbelt >= 0.7.1} BuildRequires: %{python_module requests-toolbelt >= 0.7.1}
# /SECTION # /SECTION
%if 0%{?python_version_nodots} >= 313
Requires: python-legacy-cgi >= 2.6
%endif
%python_subpackages %python_subpackages
%description %description
@@ -83,6 +89,6 @@ A modern/fast Python SOAP client based on lxml / requests
%doc CHANGES README.rst %doc CHANGES README.rst
%license LICENSE %license LICENSE
%{python_sitelib}/zeep %{python_sitelib}/zeep
%{python_sitelib}/softlayer_zeep-%{version}*-info %{python_sitelib}/softlayer_zeep-%{version}.dist-info
%changelog %changelog

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

@@ -0,0 +1,65 @@
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(-)
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",

46
xsd-date.patch Normal file
View File

@@ -0,0 +1,46 @@
From d1b0257eb7b8f41bc74c0fa178e820c2d739cf30 Mon Sep 17 00:00:00 2001
From: Michael van Tellingen <m.vantellingen@labdigital.nl>
Date: Wed, 16 Oct 2024 07:21:21 +0200
Subject: [PATCH] Fix regression in parsing xsd:Date with negative timezone
---
CHANGES | 4 ++++
src/zeep/xsd/types/builtins.py | 12 +++++-------
tests/test_xsd_builtins.py | 2 ++
3 files changed, 11 insertions(+), 7 deletions(-)
Index: softlayer-zeep-5.0.0/src/zeep/xsd/types/builtins.py
===================================================================
--- softlayer-zeep-5.0.0.orig/src/zeep/xsd/types/builtins.py
+++ softlayer-zeep-5.0.0/src/zeep/xsd/types/builtins.py
@@ -201,6 +201,7 @@ class Time(BuiltinType):
class Date(BuiltinType):
_default_qname = xsd_ns("date")
accepted_types = [datetime.date, str]
+ _pattern = re.compile(r"(\d{4})-(\d{2})-(\d{2})")
@check_no_collection
def xmlvalue(self, value):
@@ -210,6 +211,9 @@ class Date(BuiltinType):
@treat_whitespace("collapse")
def pythonvalue(self, value):
+ m = self._pattern.match(value)
+ if m:
+ return datetime.date(*map(int, m.groups()))
return isodate.parse_date(value)
Index: softlayer-zeep-5.0.0/tests/test_xsd_builtins.py
===================================================================
--- softlayer-zeep-5.0.0.orig/tests/test_xsd_builtins.py
+++ softlayer-zeep-5.0.0/tests/test_xsd_builtins.py
@@ -242,6 +242,8 @@ class TestDate:
instance = builtins.Date()
assert instance.pythonvalue("2016-03-04") == datetime.date(2016, 3, 4)
assert instance.pythonvalue("2001-10-26+02:00") == datetime.date(2001, 10, 26)
+ assert instance.pythonvalue("2001-10-26-02:00") == datetime.date(2001, 10, 26)
+ assert instance.pythonvalue("2024-08-21-10:00") == datetime.date(2024, 8, 21)
assert instance.pythonvalue("2001-10-26Z") == datetime.date(2001, 10, 26)
assert instance.pythonvalue("2001-10-26+00:00") == datetime.date(2001, 10, 26)
assert instance.pythonvalue("\r\n\t 2016-03-04 ") == datetime.date(2016, 3, 4)