Hello community,

here is the log from the commit of package python-jsonpatch for 
openSUSE:Factory checked in at 2013-05-02 11:40:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-02-23 16:39:44.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-jsonpatch.new/python-jsonpatch.changes   
2013-05-02 11:40:26.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Apr 29 12:36:33 UTC 2013 - [email protected]
+
+- update to 1.0
+  * first stable release, some bugfixes 
+
+-------------------------------------------------------------------

Old:
----
  jsonpatch-0.12.tar.gz

New:
----
  jsonpatch-1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-jsonpatch.spec ++++++
--- /var/tmp/diff_new_pack.viBMt6/_old  2013-05-02 11:40:27.000000000 +0200
+++ /var/tmp/diff_new_pack.viBMt6/_new  2013-05-02 11:40:27.000000000 +0200
@@ -13,20 +13,20 @@
 # published by the Open Source Initiative.
 
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
 
 
 Name:           python-jsonpatch
-Version:        0.12
+Version:        1.0
 Release:        0
-License:        BSD-3-Clause
 Summary:        Apply JSON-Patches (according to draft 08)
-Url:            https://github.com/stefankoegl/python-json-patch
+License:        BSD-3-Clause
 Group:          Development/Languages/Python
+Url:            https://github.com/stefankoegl/python-json-patch
 Source:         
http://pypi.python.org/packages/source/j/jsonpatch/jsonpatch-%{version}.tar.gz
 BuildRequires:  python-devel
 BuildRequires:  python-jsonpointer
-Requires:       python-jsonpointer
-Requires:       python-simplejson
+Requires:       python-jsonpointer >= 1.0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %if 0%{?suse_version} && 0%{?suse_version} <= 1110
 %{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}

++++++ jsonpatch-0.12.tar.gz -> jsonpatch-1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpatch-0.12/PKG-INFO new/jsonpatch-1.0/PKG-INFO
--- old/jsonpatch-0.12/PKG-INFO 2013-01-03 09:34:44.000000000 +0100
+++ new/jsonpatch-1.0/PKG-INFO  2013-04-03 17:41:35.000000000 +0200
@@ -1,7 +1,7 @@
 Metadata-Version: 1.0
 Name: jsonpatch
-Version: 0.12
-Summary:  Apply JSON-Patches (according to draft 08) 
+Version: 1.0
+Summary:  Apply JSON-Patches (RFC 6902) 
 Home-page: https://github.com/stefankoegl/python-json-patch
 Author: Stefan Kögl
 Author-email: [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpatch-0.12/jsonpatch.egg-info/PKG-INFO 
new/jsonpatch-1.0/jsonpatch.egg-info/PKG-INFO
--- old/jsonpatch-0.12/jsonpatch.egg-info/PKG-INFO      2013-01-03 
09:34:44.000000000 +0100
+++ new/jsonpatch-1.0/jsonpatch.egg-info/PKG-INFO       2013-04-03 
17:41:35.000000000 +0200
@@ -1,7 +1,7 @@
 Metadata-Version: 1.0
 Name: jsonpatch
-Version: 0.12
-Summary:  Apply JSON-Patches (according to draft 08) 
+Version: 1.0
+Summary:  Apply JSON-Patches (RFC 6902) 
 Home-page: https://github.com/stefankoegl/python-json-patch
 Author: Stefan Kögl
 Author-email: [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpatch-0.12/jsonpatch.egg-info/requires.txt 
new/jsonpatch-1.0/jsonpatch.egg-info/requires.txt
--- old/jsonpatch-0.12/jsonpatch.egg-info/requires.txt  2013-01-03 
09:34:44.000000000 +0100
+++ new/jsonpatch-1.0/jsonpatch.egg-info/requires.txt   2013-04-03 
17:41:35.000000000 +0200
@@ -1 +1 @@
-jsonpointer>=0.6
\ No newline at end of file
+jsonpointer>=1.0
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpatch-0.12/jsonpatch.py 
new/jsonpatch-1.0/jsonpatch.py
--- old/jsonpatch-0.12/jsonpatch.py     2013-01-03 09:33:51.000000000 +0100
+++ new/jsonpatch-1.0/jsonpatch.py      2013-04-03 15:48:49.000000000 +0200
@@ -30,13 +30,11 @@
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-""" Apply JSON-Patches (according to draft 08) """
-
-# http://tools.ietf.org/html/draft-ietf-appsawg-json-patch-05
+""" Apply JSON-Patches (RFC 6902) """
 
 # Will be parsed by setup.py to determine package metadata
 __author__ = 'Stefan Kögl <[email protected]>'
-__version__ = '0.12'
+__version__ = '1.0'
 __website__ = 'https://github.com/stefankoegl/python-json-patch'
 __license__ = 'Modified BSD License'
 
@@ -300,7 +298,7 @@
 
         for operation in self.patch:
             operation = self._get_operation(operation)
-            operation.apply(obj)
+            obj = operation.apply(obj)
 
         return obj
 
@@ -351,6 +349,8 @@
         except KeyError as ex:
             raise JsonPatchConflict(str(ex))
 
+        return obj
+
 
 class AddOperation(PatchOperation):
     """Adds an object property or an array element."""
@@ -371,12 +371,19 @@
                 subobj.insert(part, value)
 
         elif isinstance(subobj, dict):
-            subobj[part] = value
+            if part is None:
+                # we're replacing the root
+                obj = value
+
+            else:
+                subobj[part] = value
 
         else:
             raise JsonPatchConflict("can't add to type '%s'"
                                     "" % subobj.__class__.__name__)
 
+        return obj
+
 
 class ReplaceOperation(PatchOperation):
     """Replaces an object property or an array element by new value."""
@@ -399,6 +406,7 @@
                                     "" % subobj.__class__.__name__)
 
         subobj[part] = value
+        return obj
 
 
 class MoveOperation(PatchOperation):
@@ -412,8 +420,9 @@
         if from_ptr.contains(self.pointer):
             raise JsonPatchException('Cannot move values into its own 
children')
 
-        RemoveOperation({'op': 'remove', 'path': 
self.operation['from']}).apply(obj)
-        AddOperation({'op': 'add', 'path': self.location, 'value': 
value}).apply(obj)
+        obj = RemoveOperation({'op': 'remove', 'path': 
self.operation['from']}).apply(obj)
+        obj = AddOperation({'op': 'add', 'path': self.location, 'value': 
value}).apply(obj)
+        return obj
 
 
 class TestOperation(PatchOperation):
@@ -435,6 +444,8 @@
             if val != value:
                 raise JsonPatchTestFailed('%s is not equal to tested value %s 
(types %s and %s)' % (val, value, type(val), type(value)))
 
+        return obj
+
 
 class CopyOperation(PatchOperation):
     """ Copies an object property or an array element to a new location """
@@ -443,4 +454,5 @@
         from_ptr = jsonpointer.JsonPointer(self.operation['from'])
         subobj, part = from_ptr.to_last(obj)
         value = copy.deepcopy(subobj[part])
-        AddOperation({'op': 'add', 'path': self.location, 'value': 
value}).apply(obj)
+        obj = AddOperation({'op': 'add', 'path': self.location, 'value': 
value}).apply(obj)
+        return obj
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpatch-0.12/requirements.txt 
new/jsonpatch-1.0/requirements.txt
--- old/jsonpatch-0.12/requirements.txt 2013-01-03 08:51:16.000000000 +0100
+++ new/jsonpatch-1.0/requirements.txt  2013-04-03 15:48:18.000000000 +0200
@@ -1 +1 @@
-jsonpointer>=0.6
+jsonpointer>=1.0

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to