Hello community, here is the log from the commit of package python-jsonpatch for openSUSE:Factory checked in at 2013-07-22 13:33:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-jsonpatch (Old) and /work/SRC/openSUSE:Factory/.python-jsonpatch.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jsonpatch" Changes: -------- --- /work/SRC/openSUSE:Factory/python-jsonpatch/python-jsonpatch.changes 2013-05-02 11:40:26.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-jsonpatch.new/python-jsonpatch.changes 2013-07-22 13:48:20.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Jul 11 14:41:17 UTC 2013 - [email protected] + +- update to 1.1: + * various python 3.x fixes + +------------------------------------------------------------------- Old: ---- jsonpatch-1.0.tar.gz New: ---- jsonpatch-1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-jsonpatch.spec ++++++ --- /var/tmp/diff_new_pack.e0cLuV/_old 2013-07-22 13:48:21.000000000 +0200 +++ /var/tmp/diff_new_pack.e0cLuV/_new 2013-07-22 13:48:21.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-jsonpatch -Version: 1.0 +Version: 1.1 Release: 0 Summary: Apply JSON-Patches (according to draft 08) License: BSD-3-Clause ++++++ jsonpatch-1.0.tar.gz -> jsonpatch-1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.0/PKG-INFO new/jsonpatch-1.1/PKG-INFO --- old/jsonpatch-1.0/PKG-INFO 2013-04-03 17:41:35.000000000 +0200 +++ new/jsonpatch-1.1/PKG-INFO 2013-06-27 21:50:38.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: jsonpatch -Version: 1.0 +Version: 1.1 Summary: Apply JSON-Patches (RFC 6902) Home-page: https://github.com/stefankoegl/python-json-patch Author: Stefan Kögl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.0/jsonpatch.egg-info/PKG-INFO new/jsonpatch-1.1/jsonpatch.egg-info/PKG-INFO --- old/jsonpatch-1.0/jsonpatch.egg-info/PKG-INFO 2013-04-03 17:41:35.000000000 +0200 +++ new/jsonpatch-1.1/jsonpatch.egg-info/PKG-INFO 2013-06-27 21:50:37.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: jsonpatch -Version: 1.0 +Version: 1.1 Summary: Apply JSON-Patches (RFC 6902) Home-page: https://github.com/stefankoegl/python-json-patch Author: Stefan Kögl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/jsonpatch-1.0/jsonpatch.py new/jsonpatch-1.1/jsonpatch.py --- old/jsonpatch-1.0/jsonpatch.py 2013-04-03 15:48:49.000000000 +0200 +++ new/jsonpatch-1.1/jsonpatch.py 2013-06-27 21:49:49.000000000 +0200 @@ -30,11 +30,13 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +from __future__ import unicode_literals + """ Apply JSON-Patches (RFC 6902) """ # Will be parsed by setup.py to determine package metadata __author__ = 'Stefan Kögl <[email protected]>' -__version__ = '1.0' +__version__ = '1.1' __website__ = 'https://github.com/stefankoegl/python-json-patch' __license__ = 'Modified BSD License' @@ -87,10 +89,10 @@ >>> other = apply_patch(doc, [{'op': 'add', 'path': '/baz', 'value': 'qux'}]) >>> doc is not other True - >>> other - {'foo': 'bar', 'baz': 'qux'} - >>> apply_patch(doc, [{'op': 'add', 'path': '/baz', 'value': 'qux'}], in_place=True) - {'foo': 'bar', 'baz': 'qux'} + >>> other == {'foo': 'bar', 'baz': 'qux'} + True + >>> apply_patch(doc, [{'op': 'add', 'path': '/baz', 'value': 'qux'}], in_place=True) == {'foo': 'bar', 'baz': 'qux'} + True >>> doc == other True """ @@ -392,6 +394,9 @@ value = self.operation["value"] subobj, part = self.pointer.to_last(obj) + if part is None: + return value + if isinstance(subobj, list): if part > len(subobj) or part < 0: raise JsonPatchConflict("can't replace outside of list") -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
