forked from pool/python-zeep
- Add patches to fix build with current pytests (From upstream PRs):
* pytest4.patch
* pytest5.patch
- Tweak the deps to stay resolvable
- Fix unit tests
- Use better way to handle tornado version compatibility.
- Don't allow python-tornado >= 5
- update to 3.4.0
* Allow passing xsd.Nil to sequences
* Add support for passing custom digest and signature methods during WSSE
signing
* Fix path resolving during XSD imports
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zeep?expand=0&rev=2
This commit is contained in:
committed by
Git OBS Bridge
parent
21b900b705
commit
ad0bbc3e30
23
pytest4.patch
Normal file
23
pytest4.patch
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
From d8b162ec931246e4d4b2a6aadf036b444fa00dbb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Felix Yan <felixonmars@archlinux.org>
|
||||||
|
Date: Sat, 9 Mar 2019 14:45:55 +0800
|
||||||
|
Subject: [PATCH] Update test requirements
|
||||||
|
|
||||||
|
Tests pass here with the updated versions.
|
||||||
|
---
|
||||||
|
tests/conftest.py | 2 +-
|
||||||
|
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
Index: zeep-3.4.0/tests/conftest.py
|
||||||
|
===================================================================
|
||||||
|
--- zeep-3.4.0.orig/tests/conftest.py
|
||||||
|
+++ zeep-3.4.0/tests/conftest.py
|
||||||
|
@@ -11,7 +11,7 @@ pytest.register_assert_rewrite("tests.ut
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True)
|
||||||
|
def no_requests(request, monkeypatch):
|
||||||
|
- if request.node.get_marker("requests"):
|
||||||
|
+ if request.node.get_closest_marker('requests'):
|
||||||
|
return
|
||||||
|
|
||||||
|
def func(*args, **kwargs):
|
||||||
45
pytest5.patch
Normal file
45
pytest5.patch
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
From ba7edd6bf2b31023b31e8f17c161e1d6d5af3d29 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jonathan Ringer <jonringer117@gmail.com>
|
||||||
|
Date: Fri, 13 Sep 2019 08:49:34 -0700
|
||||||
|
Subject: [PATCH] Make tests compatible with pytest5
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/test_xsd_parse.py | 2 +-
|
||||||
|
tests/test_xsd_validation.py | 4 ++--
|
||||||
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_xsd_parse.py b/tests/test_xsd_parse.py
|
||||||
|
index 08285342..5478ede7 100644
|
||||||
|
--- a/tests/test_xsd_parse.py
|
||||||
|
+++ b/tests/test_xsd_parse.py
|
||||||
|
@@ -587,7 +587,7 @@ def test_xsd_choice_with_references():
|
||||||
|
|
||||||
|
with pytest.raises(exceptions.XMLParseError) as exc:
|
||||||
|
result = elm.parse(xml, schema)
|
||||||
|
- assert "BAD_ELEMENT" in str(exc)
|
||||||
|
+ assert "BAD_ELEMENT" in str(exc.value)
|
||||||
|
|
||||||
|
xml = load_xml(
|
||||||
|
b"""
|
||||||
|
diff --git a/tests/test_xsd_validation.py b/tests/test_xsd_validation.py
|
||||||
|
index 60c4bc1c..85a95720 100644
|
||||||
|
--- a/tests/test_xsd_validation.py
|
||||||
|
+++ b/tests/test_xsd_validation.py
|
||||||
|
@@ -39,7 +39,7 @@ def test_validate_element_value():
|
||||||
|
|
||||||
|
with pytest.raises(exceptions.ValidationError) as exc:
|
||||||
|
result = render_node(container_elm, obj)
|
||||||
|
- assert "Missing element item (container.item)" in str(exc)
|
||||||
|
+ assert "Missing element item (container.item)" in str(exc.value)
|
||||||
|
|
||||||
|
obj.item = "bar"
|
||||||
|
result = render_node(container_elm, obj)
|
||||||
|
@@ -82,7 +82,7 @@ def test_validate_required_attribute():
|
||||||
|
with pytest.raises(exceptions.ValidationError) as exc:
|
||||||
|
result = render_node(container_elm, obj)
|
||||||
|
assert "The attribute item is not valid: Value is required (container.item)" in str(
|
||||||
|
- exc
|
||||||
|
+ exc.value
|
||||||
|
)
|
||||||
|
|
||||||
|
obj.item = "bar"
|
||||||
@@ -1,3 +1,31 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 8 07:33:19 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Add patches to fix build with current pytests (From upstream PRs):
|
||||||
|
* pytest4.patch
|
||||||
|
* pytest5.patch
|
||||||
|
- Tweak the deps to stay resolvable
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 26 16:57:00 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
||||||
|
|
||||||
|
- Fix unit tests
|
||||||
|
- Use better way to handle tornado version compatibility.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 29 17:21:09 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
||||||
|
|
||||||
|
- Don't allow python-tornado >= 5
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 14 08:54:20 UTC 2019 - Marketa Calabkova <mcalabkova@suse.com>
|
||||||
|
|
||||||
|
- update to 3.4.0
|
||||||
|
* Allow passing xsd.Nil to sequences
|
||||||
|
* Add support for passing custom digest and signature methods during WSSE
|
||||||
|
signing
|
||||||
|
* Fix path resolving during XSD imports
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Mar 25 11:43:38 UTC 2019 - pgajdos@suse.com
|
Mon Mar 25 11:43:38 UTC 2019 - pgajdos@suse.com
|
||||||
|
|
||||||
|
|||||||
@@ -18,13 +18,15 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-zeep
|
Name: python-zeep
|
||||||
Version: 3.3.1
|
Version: 3.4.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A Python SOAP client based on lxml/requests
|
Summary: A Python SOAP client based on lxml/requests
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: http://docs.python-zeep.org
|
URL: http://docs.python-zeep.org
|
||||||
Source: https://files.pythonhosted.org/packages/source/z/zeep/zeep-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/z/zeep/zeep-%{version}.tar.gz
|
||||||
|
Patch1: pytest4.patch
|
||||||
|
Patch2: pytest5.patch
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -53,6 +55,7 @@ BuildRequires: %{python_module mock >= 2.0.0}
|
|||||||
BuildRequires: %{python_module pretend >= 1.0.8}
|
BuildRequires: %{python_module pretend >= 1.0.8}
|
||||||
BuildRequires: %{python_module pytest >= 3.1.3}
|
BuildRequires: %{python_module pytest >= 3.1.3}
|
||||||
BuildRequires: %{python_module pytest-tornado >= 0.4.5}
|
BuildRequires: %{python_module pytest-tornado >= 0.4.5}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module pytz}
|
BuildRequires: %{python_module pytz}
|
||||||
BuildRequires: %{python_module requests >= 2.7.0}
|
BuildRequires: %{python_module requests >= 2.7.0}
|
||||||
BuildRequires: %{python_module requests-mock >= 0.7.0}
|
BuildRequires: %{python_module requests-mock >= 0.7.0}
|
||||||
@@ -73,6 +76,7 @@ Python SOAP client based on python-lxml and python-requests
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n zeep-%{version}
|
%setup -q -n zeep-%{version}
|
||||||
|
%autopatch -p1
|
||||||
# disable broken tests
|
# disable broken tests
|
||||||
rm tests/test_wsse_signature.py
|
rm tests/test_wsse_signature.py
|
||||||
rm tests/test_wsse_username.py
|
rm tests/test_wsse_username.py
|
||||||
@@ -88,7 +92,7 @@ rm tests/test_wsse_utils.py
|
|||||||
%check
|
%check
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
export PYTHONDONTWRITEBYTECODE=1
|
export PYTHONDONTWRITEBYTECODE=1
|
||||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} tests/
|
%pytest tests/
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc CHANGES README.rst
|
%doc CHANGES README.rst
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f58328e36264a2fda2484dd20bb1695f4102a9cc918178d60c4d7cf8339c65d0
|
|
||||||
size 161684
|
|
||||||
3
zeep-3.4.0.tar.gz
Normal file
3
zeep-3.4.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0e98669cfeb60756231ae185498f9ae21b30b2681786b8de58ed34c3b93e41dd
|
||||||
|
size 163748
|
||||||
Reference in New Issue
Block a user