From 820b4605bd4100b4ba4bde4407444dc354917e8cfd016dbec2a2981117b9eded Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 19 Mar 2020 05:05:03 +0000 Subject: [PATCH] - Update to 2.1.5: * Removed urlparse2 dependency * Updated jsonpatch requirements; jsonpatch 1.25 dropped Python 3.4 support - Dropped patch 0001-remove-urlparse2-dependncy.patch, now included OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-redfish?expand=0&rev=3 --- 0001-remove-urlparse2-dependncy.patch | 130 -------------------------- python-redfish.changes | 8 ++ python-redfish.spec | 8 +- redfish-2.1.4.tar.gz | 3 - redfish-2.1.5.tar.gz | 3 + 5 files changed, 15 insertions(+), 137 deletions(-) delete mode 100644 0001-remove-urlparse2-dependncy.patch delete mode 100644 redfish-2.1.4.tar.gz create mode 100644 redfish-2.1.5.tar.gz diff --git a/0001-remove-urlparse2-dependncy.patch b/0001-remove-urlparse2-dependncy.patch deleted file mode 100644 index 149d434..0000000 --- a/0001-remove-urlparse2-dependncy.patch +++ /dev/null @@ -1,130 +0,0 @@ -From 953e3bd640b79ff621ba2b4cc7215581916ddb99 Mon Sep 17 00:00:00 2001 -From: Bill Dodd -Date: Wed, 29 Jan 2020 17:18:25 -0600 -Subject: [PATCH] remove urlparse2 dependncy - ---- - requirements.txt | 4 ++-- - setup.py | 12 +++++++++--- - src/redfish/ris/rmc_helper.py | 5 +++-- - tests/ris/test_rmc_helper.py | 29 +++++++++++++++++++++++++++++ - tox.ini | 8 ++++++++ - 5 files changed, 51 insertions(+), 7 deletions(-) - create mode 100644 tests/ris/test_rmc_helper.py - -diff --git a/requirements.txt b/requirements.txt -index 060d85f..fba487f 100644 ---- a/requirements.txt -+++ b/requirements.txt -@@ -1,4 +1,4 @@ --jsonpatch -+jsonpatch<=1.24 ; python_version == '3.4' -+jsonpatch ; python_version >= '3.5' or python_version == '2.7' - jsonpath_rw - jsonpointer --urlparse2 -\ No newline at end of file -diff --git a/setup.py b/setup.py -index 344e597..c5ea3b7 100644 ---- a/setup.py -+++ b/setup.py -@@ -24,8 +24,14 @@ setup(name='redfish', - packages=find_packages('src'), - package_dir={'': 'src'}, - install_requires=[ -- 'jsonpatch', - 'jsonpath_rw', - 'jsonpointer', -- 'urlparse2', -- ]) -+ ], -+ extras_require={ -+ ':python_version == "3.4"': [ -+ 'jsonpatch<=1.24' -+ ], -+ ':python_version >= "3.5" or python_version == "2.7"': [ -+ 'jsonpatch' -+ ] -+ }) -diff --git a/src/redfish/ris/rmc_helper.py b/src/redfish/ris/rmc_helper.py -index e633a49..5e7b5dc 100644 ---- a/src/redfish/ris/rmc_helper.py -+++ b/src/redfish/ris/rmc_helper.py -@@ -12,9 +12,10 @@ import json - import errno - import logging - import hashlib --import urlparse2 - import redfish.rest - -+from six.moves.urllib.parse import urlparse -+ - from .ris import (RisMonolith) - from .sharedtypes import (JSONEncoder) - from .config import (AutoConfigParser) -@@ -146,7 +147,7 @@ class RmcClient(object): - - def get_cache_dirname(self): - """The rest client's current base URL converted to path""" -- parts = urlparse2.urlparse(self.get_base_url()) -+ parts = urlparse(self.get_base_url()) - pathstr = '%s/%s' % (parts.netloc, parts.path) - return pathstr.replace('//', '/') - -diff --git a/tests/ris/test_rmc_helper.py b/tests/ris/test_rmc_helper.py -new file mode 100644 -index 0000000..dbf4a29 ---- /dev/null -+++ b/tests/ris/test_rmc_helper.py -@@ -0,0 +1,29 @@ -+# Copyright Notice: -+# Copyright 2020 DMTF. All rights reserved. -+# License: BSD 3-Clause License. For full text see link: -+# https://github.com/DMTF/Redfish-Protocol-Validator/blob/master/LICENSE.md -+ -+import unittest -+try: -+ from unittest import mock -+except ImportError: -+ import mock -+ -+from redfish.ris import rmc_helper -+ -+ -+class RmcHelper(unittest.TestCase): -+ def setUp(self): -+ super(RmcHelper, self).setUp() -+ -+ @mock.patch('redfish.rest.v1.HttpClient') -+ def test_get_cache_dirname(self, mock_http_client): -+ url = 'http://example.com' -+ helper = rmc_helper.RmcClient(url=url, username='oper', password='xyz') -+ mock_http_client.return_value.get_base_url.return_value = url -+ dir_name = helper.get_cache_dirname() -+ self.assertEqual(dir_name, 'example.com/') -+ -+ -+if __name__ == '__main__': -+ unittest.main() -diff --git a/tox.ini b/tox.ini -index 986f141..b1b8a84 100644 ---- a/tox.ini -+++ b/tox.ini -@@ -14,6 +14,14 @@ commands = - --with-timer \ - --with-coverage --cover-erase --cover-package=src - -+[testenv:py27] -+deps = -+ coverage -+ fixtures -+ mock -+ nose -+ nose-timer -+ - [testenv:pep8] - basepython = python3.6 - deps = flake8 --- -2.25.0 - diff --git a/python-redfish.changes b/python-redfish.changes index 1d9e79e..50bea86 100644 --- a/python-redfish.changes +++ b/python-redfish.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Mar 19 05:02:34 UTC 2020 - Steve Kowalik + +- Update to 2.1.5: + * Removed urlparse2 dependency + * Updated jsonpatch requirements; jsonpatch 1.25 dropped Python 3.4 support +- Dropped patch 0001-remove-urlparse2-dependncy.patch, now included + ------------------------------------------------------------------- Thu Jan 30 21:40:14 UTC 2020 - Martin Hauke diff --git a/python-redfish.spec b/python-redfish.spec index 3291a15..10f9f17 100644 --- a/python-redfish.spec +++ b/python-redfish.spec @@ -1,6 +1,7 @@ # # spec file for package python-redfish # +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2020, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -12,19 +13,19 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-redfish -Version: 2.1.4 +Version: 2.1.5 Release: 0 Summary: Redfish Python Library License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/DMTF/python-redfish-library Source: https://github.com/DMTF/python-redfish-library/archive/%{version}.tar.gz#/redfish-%{version}.tar.gz -Patch0: 0001-remove-urlparse2-dependncy.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -48,7 +49,6 @@ the Engine of Application State) Redfish architecture. %prep %setup -q -n %{name}-library-%{version} -%patch0 -p1 %build %python_build diff --git a/redfish-2.1.4.tar.gz b/redfish-2.1.4.tar.gz deleted file mode 100644 index 2c67105..0000000 --- a/redfish-2.1.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d03909a0b36f668a89f9ca5742d094c4a7d373890e63dd2ff6b98ef4e3fecaa2 -size 37435 diff --git a/redfish-2.1.5.tar.gz b/redfish-2.1.5.tar.gz new file mode 100644 index 0000000..ef87aaa --- /dev/null +++ b/redfish-2.1.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8f0314d9bee3fafc9f200b390e48b67e215ad65db9d0c86bdb678c990a68af8 +size 37864