15
0

- 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
This commit is contained in:
2024-10-29 05:34:59 +00:00
committed by Git OBS Bridge
commit b16b8f897e
6 changed files with 221 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

View File

@@ -0,0 +1,27 @@
-------------------------------------------------------------------
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>
- Add skip-networked-test.patch to fix
gh#mvantellingen/python-zeep#1402 skipping tests requiring
network connection
-------------------------------------------------------------------
Sat Jul 1 09:08:59 UTC 2023 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Fri Jul 8 07:47:52 UTC 2022 - Dirk Müller <dmueller@suse.com>
- make it provide/obsolete python-zeep as it is a fork of it
-------------------------------------------------------------------
Thu Jul 7 10:48:50 UTC 2022 - Dirk Müller <dmueller@suse.com>
- Initial package (5.0.0)

View File

@@ -0,0 +1,91 @@
#
# spec file for package python-softlayer-zeep
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-softlayer-zeep
Version: 5.0.0
Release: 0
Summary: A modern/fast Python SOAP client based on lxml / requests
License: MIT
#Git-Clone: https://github.com/softlayer/softlayer-zeep
URL: https://docs.python-zeep.org
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
# skip tests requiring network connection
Patch0: skip-networked-test.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-attrs >= 17.2.0
Requires: python-isodate >= 0.5.4
Requires: python-lxml >= 4.6.0
Requires: python-platformdirs >= 1.4.0
Requires: python-pytz
Requires: python-requests >= 2.7.0
Requires: python-requests-file >= 1.5.1
Requires: python-requests-toolbelt >= 0.7.1
Provides: python-zeep = %{version}
Obsoletes: python-zeep < %{version}
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module attrs >= 17.2.0}
BuildRequires: %{python_module freezegun >= 0.3.15}
BuildRequires: %{python_module isodate >= 0.5.4}
BuildRequires: %{python_module isort >= 5.3.2}
BuildRequires: %{python_module legacy-cgi >= 2.6}
BuildRequires: %{python_module lxml >= 4.6.0}
BuildRequires: %{python_module platformdirs >= 1.4.0}
BuildRequires: %{python_module pretend == 1.0.9}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-httpx}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytz}
BuildRequires: %{python_module requests >= 2.7.0}
BuildRequires: %{python_module requests-file >= 1.5.1}
BuildRequires: %{python_module requests-mock >= 0.7.0}
BuildRequires: %{python_module requests-toolbelt >= 0.7.1}
# /SECTION
%if 0%{?python_version_nodots} >= 313
Requires: python-legacy-cgi >= 2.6
%endif
%python_subpackages
%description
A modern/fast Python SOAP client based on lxml / requests
%prep
%autosetup -p1 -n softlayer-zeep-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest -k 'not network'
%files %{python_files}
%doc CHANGES README.rst
%license LICENSE
%{python_sitelib}/zeep
%{python_sitelib}/softlayer_zeep-%{version}.dist-info
%changelog

76
skip-networked-test.patch Normal file
View File

@@ -0,0 +1,76 @@
---
pyproject.toml | 3 ++-
tests/test_cache.py | 4 ++++
tests/test_wsse_username.py | 3 +++
3 files changed, 9 insertions(+), 1 deletion(-)
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -28,5 +28,6 @@ testpaths = [
]
markers = [
# mark a test to allow socket usage
- "requests"
+ "requests",
+ "network: test case requires network connection",
]
--- a/tests/test_cache.py
+++ b/tests/test_cache.py
@@ -35,6 +35,7 @@ class TestSqliteCache:
result = c.get("http://tests.python-zeep.org/example.wsdl")
assert result is None
+ @pytest.mark.network
def test_has_expired(self, tmpdir):
c = cache.SqliteCache(path=tmpdir.join("sqlite.cache.db").strpath)
c.add("http://tests.python-zeep.org/example.wsdl", b"content")
@@ -51,6 +52,7 @@ class TestSqliteCache:
assert result == b"content"
+@pytest.mark.network
def test_memory_cache_timeout(tmpdir):
c = cache.InMemoryCache()
c.add("http://tests.python-zeep.org/example.wsdl", b"content")
@@ -76,6 +78,7 @@ class TestIsExpired:
def test_timeout_none(self):
assert cache._is_expired(100, None) is False
+ @pytest.mark.network
def test_has_expired(self):
timeout = 7200
utcnow = datetime.datetime.utcnow()
@@ -83,6 +86,7 @@ class TestIsExpired:
with freezegun.freeze_time(utcnow):
assert cache._is_expired(value, timeout) is False
+ @pytest.mark.network
def test_has_not_expired(self):
timeout = 7200
utcnow = datetime.datetime.utcnow()
--- a/tests/test_wsse_username.py
+++ b/tests/test_wsse_username.py
@@ -85,6 +85,7 @@ def test_password_text():
assert_nodes_equal(envelope, expected)
+@pytest.mark.network
@freeze_time("2016-05-08 12:00:00")
def test_password_digest(monkeypatch):
monkeypatch.setattr(os, "urandom", lambda x: b"mocked-random")
@@ -138,6 +139,7 @@ def test_password_digest(monkeypatch):
assert_nodes_equal(envelope, expected)
+@pytest.mark.network
@freeze_time("2016-05-08 12:00:00")
def test_password_digest_custom(monkeypatch):
monkeypatch.setattr(os, "urandom", lambda x: b"mocked-random")
@@ -323,6 +325,7 @@ def test_timestamp_token():
assert_nodes_equal(envelope, expected)
+@pytest.mark.network
@freeze_time("2016-05-08 12:00:00")
def test_bytes_like_password_digest(monkeypatch):
monkeypatch.setattr(os, "urandom", lambda x: b"mocked-random")

View File

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