Hello community,
here is the log from the commit of package python-pynetbox for openSUSE:Factory
checked in at 2020-07-17 20:48:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pynetbox (Old)
and /work/SRC/openSUSE:Factory/.python-pynetbox.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pynetbox"
Fri Jul 17 20:48:36 2020 rev:14 rq:821335 version:5.0.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pynetbox/python-pynetbox.changes
2020-07-09 13:21:24.413656335 +0200
+++
/work/SRC/openSUSE:Factory/.python-pynetbox.new.3592/python-pynetbox.changes
2020-07-17 20:49:19.968825325 +0200
@@ -1,0 +2,7 @@
+Thu Jul 16 15:20:57 UTC 2020 - Martin Hauke <[email protected]>
+
+- Update to version 5.0.5
+ * Fixes issue with unchanged tags being reordered when .save()
+ is called that caused unnecessary updates to NetBox.
+
+-------------------------------------------------------------------
Old:
----
pynetbox-5.0.4.tar.gz
New:
----
pynetbox-5.0.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pynetbox.spec ++++++
--- /var/tmp/diff_new_pack.4ofid7/_old 2020-07-17 20:49:21.548826973 +0200
+++ /var/tmp/diff_new_pack.4ofid7/_new 2020-07-17 20:49:21.552826978 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pynetbox
-Version: 5.0.4
+Version: 5.0.5
Release: 0
Summary: NetBox API client library
License: Apache-2.0
++++++ pynetbox-5.0.4.tar.gz -> pynetbox-5.0.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pynetbox-5.0.4/PKG-INFO new/pynetbox-5.0.5/PKG-INFO
--- old/pynetbox-5.0.4/PKG-INFO 2020-07-08 17:31:56.122555500 +0200
+++ new/pynetbox-5.0.5/PKG-INFO 2020-07-15 21:50:32.512465500 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pynetbox
-Version: 5.0.4
+Version: 5.0.5
Summary: NetBox API client library
Home-page: https://github.com/digitalocean/pynetbox
Author: Zach Moody
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pynetbox-5.0.4/pynetbox/core/response.py
new/pynetbox-5.0.5/pynetbox/core/response.py
--- old/pynetbox-5.0.4/pynetbox/core/response.py 2020-07-08
17:31:48.000000000 +0200
+++ new/pynetbox-5.0.5/pynetbox/core/response.py 2020-07-15
21:50:20.000000000 +0200
@@ -14,6 +14,7 @@
limitations under the License.
"""
import copy
+from collections import OrderedDict
import pynetbox.core.app
from six.moves.urllib.parse import urlsplit
@@ -341,7 +342,7 @@
v.id if isinstance(v, Record) else v for v in
current_val
]
if i in LIST_AS_SET:
- current_val = list(set(current_val))
+ current_val = list(OrderedDict.fromkeys(current_val))
ret[i] = current_val
return ret
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pynetbox-5.0.4/pynetbox.egg-info/PKG-INFO
new/pynetbox-5.0.5/pynetbox.egg-info/PKG-INFO
--- old/pynetbox-5.0.4/pynetbox.egg-info/PKG-INFO 2020-07-08
17:31:55.000000000 +0200
+++ new/pynetbox-5.0.5/pynetbox.egg-info/PKG-INFO 2020-07-15
21:50:32.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pynetbox
-Version: 5.0.4
+Version: 5.0.5
Summary: NetBox API client library
Home-page: https://github.com/digitalocean/pynetbox
Author: Zach Moody
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pynetbox-5.0.4/tests/unit/test_response.py
new/pynetbox-5.0.5/tests/unit/test_response.py
--- old/pynetbox-5.0.4/tests/unit/test_response.py 2020-07-08
17:31:48.000000000 +0200
+++ new/pynetbox-5.0.5/tests/unit/test_response.py 2020-07-15
21:50:20.000000000 +0200
@@ -209,3 +209,25 @@
)
ret = test._endpoint_from_url(test.url)
self.assertEqual(ret.name, "test-endpoint")
+
+ def test_serialize_tag_list_order(self):
+ """Add tests to ensure we're preserving tag order
+
+ This test could still give false-negatives, but making the tag list
+ longer helps mitigate that.
+ """
+
+ test_tags = [
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "ten",
+ ]
+ test = Record({"id": 123, "tags": test_tags}, None, None).serialize()
+ self.assertEqual(test["tags"], test_tags)