Hello community, here is the log from the commit of package python-pynetbox for openSUSE:Factory checked in at 2020-01-12 23:25:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pynetbox (Old) and /work/SRC/openSUSE:Factory/.python-pynetbox.new.6675 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pynetbox" Sun Jan 12 23:25:08 2020 rev:9 rq:763521 version:4.2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pynetbox/python-pynetbox.changes 2019-12-11 12:14:12.092527117 +0100 +++ /work/SRC/openSUSE:Factory/.python-pynetbox.new.6675/python-pynetbox.changes 2020-01-12 23:26:27.230862056 +0100 @@ -1,0 +2,6 @@ +Sun Jan 12 09:18:34 UTC 2020 - Martin Hauke <mar...@gmx.de> + +- Update to version 4.2.4 + * Fixes Nested Record Write methods + +------------------------------------------------------------------- Old: ---- pynetbox-4.2.2.tar.gz New: ---- pynetbox-4.2.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pynetbox.spec ++++++ --- /var/tmp/diff_new_pack.BMum1Q/_old 2020-01-12 23:26:27.546862172 +0100 +++ /var/tmp/diff_new_pack.BMum1Q/_new 2020-01-12 23:26:27.546862172 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-pynetbox # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pynetbox -Version: 4.2.2 +Version: 4.2.4 Release: 0 Summary: NetBox API client library License: Apache-2.0 ++++++ pynetbox-4.2.2.tar.gz -> pynetbox-4.2.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pynetbox-4.2.2/PKG-INFO new/pynetbox-4.2.4/PKG-INFO --- old/pynetbox-4.2.2/PKG-INFO 2019-12-10 17:27:54.000000000 +0100 +++ new/pynetbox-4.2.4/PKG-INFO 2020-01-12 07:26:21.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pynetbox -Version: 4.2.2 +Version: 4.2.4 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-4.2.2/pynetbox/core/query.py new/pynetbox-4.2.4/pynetbox/core/query.py --- old/pynetbox-4.2.2/pynetbox/core/query.py 2019-12-10 17:27:36.000000000 +0100 +++ new/pynetbox-4.2.4/pynetbox/core/query.py 2020-01-12 07:26:06.000000000 +0100 @@ -140,6 +140,7 @@ private_key=None, session_key=None, ssl_verify=True, + url=None, ): """ Instantiates a new Request object diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pynetbox-4.2.2/pynetbox/core/response.py new/pynetbox-4.2.4/pynetbox/core/response.py --- old/pynetbox-4.2.2/pynetbox/core/response.py 2019-12-10 17:27:36.000000000 +0100 +++ new/pynetbox-4.2.4/pynetbox/core/response.py 2020-01-12 07:26:06.000000000 +0100 @@ -384,8 +384,8 @@ if diff: serialized = self.serialize() req = Request( - key=self.id, - base=self.endpoint.url, + key=self.id if not self.url else None, + base=self.url or self.endpoint.url, token=self.api.token, session_key=self.api.session_key, ssl_verify=self.api.ssl_verify, @@ -433,8 +433,8 @@ >>> """ req = Request( - key=self.id, - base=self.endpoint.url, + key=self.id if not self.url else None, + base=self.url or self.endpoint.url, token=self.api.token, session_key=self.api.session_key, ssl_verify=self.api.ssl_verify, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pynetbox-4.2.2/pynetbox.egg-info/PKG-INFO new/pynetbox-4.2.4/pynetbox.egg-info/PKG-INFO --- old/pynetbox-4.2.2/pynetbox.egg-info/PKG-INFO 2019-12-10 17:27:53.000000000 +0100 +++ new/pynetbox-4.2.4/pynetbox.egg-info/PKG-INFO 2020-01-12 07:26:20.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pynetbox -Version: 4.2.2 +Version: 4.2.4 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-4.2.2/tests/unit/test_response.py new/pynetbox-4.2.4/tests/unit/test_response.py --- old/pynetbox-4.2.2/tests/unit/test_response.py 2019-12-10 17:27:36.000000000 +0100 +++ new/pynetbox-4.2.4/tests/unit/test_response.py 2020-01-12 07:26:06.000000000 +0100 @@ -139,3 +139,21 @@ test2 = Record({}, None, endpoint2) test2.id = 1 self.assertEqual(test1, test2) + + def test_nested_write(self): + app = Mock() + app.token = 'abc123' + endpoint = Mock() + endpoint.name = "test-endpoint" + test = Record({ + 'id': 123, + 'name': 'test', + 'child': { + 'id': 321, + 'name': 'test123', + 'url': 'http://localhost:8080/test', + }, + }, app, endpoint) + test.child.name = 'test321' + test.child.save() + self.assertEqual(app.http_session.patch.call_args[0][0], "http://localhost:8080/test/")