Hello community,

here is the log from the commit of package python-jsonpatch for 
openSUSE:Factory checked in at 2019-09-23 12:08:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jsonpatch (Old)
 and      /work/SRC/openSUSE:Factory/.python-jsonpatch.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-jsonpatch"

Mon Sep 23 12:08:43 2019 rev:19 rq:730151 version:1.24

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jsonpatch/python-jsonpatch.changes        
2019-05-22 10:51:15.807330070 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-jsonpatch.new.7948/python-jsonpatch.changes  
    2019-09-23 12:08:46.369891872 +0200
@@ -1,0 +2,6 @@
+Wed Sep 11 13:24:02 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.24:
+  * test with python 3.8
+
+-------------------------------------------------------------------

Old:
----
  jsonpatch-1.23.tar.gz

New:
----
  jsonpatch-1.24.tar.gz

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

Other differences:
------------------
++++++ python-jsonpatch.spec ++++++
--- /var/tmp/diff_new_pack.AMuBlp/_old  2019-09-23 12:08:47.225891731 +0200
+++ /var/tmp/diff_new_pack.AMuBlp/_new  2019-09-23 12:08:47.229891730 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-jsonpatch
-Version:        1.23
+Version:        1.24
 Release:        0
 Summary:        Python - JSON-Patches
 License:        BSD-3-Clause
@@ -27,6 +27,7 @@
 Source:         
https://files.pythonhosted.org/packages/source/j/jsonpatch/jsonpatch-%{version}.tar.gz
 BuildRequires:  %{python_module jsonpointer >= 1.9}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-jsonpointer >= 1.9
 Requires(post): update-alternatives
@@ -45,6 +46,7 @@
 
 %install
 %python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 # Prepare for update-alternatives usage
 %python_clone -a %{buildroot}%{_bindir}/jsonpatch

++++++ jsonpatch-1.23.tar.gz -> jsonpatch-1.24.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpatch-1.23/PKG-INFO new/jsonpatch-1.24/PKG-INFO
--- old/jsonpatch-1.23/PKG-INFO 2018-04-02 18:02:47.000000000 +0200
+++ new/jsonpatch-1.24/PKG-INFO 2019-07-28 18:07:34.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: jsonpatch
-Version: 1.23
+Version: 1.24
 Summary:  Apply JSON-Patches (RFC 6902) 
 Home-page: https://github.com/stefankoegl/python-json-patch
 Author: Stefan Kögl
@@ -65,6 +65,7 @@
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Software Development :: Libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpatch-1.23/jsonpatch.egg-info/PKG-INFO 
new/jsonpatch-1.24/jsonpatch.egg-info/PKG-INFO
--- old/jsonpatch-1.23/jsonpatch.egg-info/PKG-INFO      2018-04-02 
18:02:47.000000000 +0200
+++ new/jsonpatch-1.24/jsonpatch.egg-info/PKG-INFO      2019-07-28 
18:07:34.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: jsonpatch
-Version: 1.23
+Version: 1.24
 Summary:  Apply JSON-Patches (RFC 6902) 
 Home-page: https://github.com/stefankoegl/python-json-patch
 Author: Stefan Kögl
@@ -65,6 +65,7 @@
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Software Development :: Libraries
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpatch-1.23/jsonpatch.py 
new/jsonpatch-1.24/jsonpatch.py
--- old/jsonpatch-1.23/jsonpatch.py     2018-04-02 18:01:57.000000000 +0200
+++ new/jsonpatch-1.24/jsonpatch.py     2019-07-28 18:07:12.000000000 +0200
@@ -56,7 +56,7 @@
 
 # Will be parsed by setup.py to determine package metadata
 __author__ = 'Stefan Kögl <[email protected]>'
-__version__ = '1.23'
+__version__ = '1.24'
 __website__ = 'https://github.com/stefankoegl/python-json-patch'
 __license__ = 'Modified BSD License'
 
@@ -435,8 +435,10 @@
                 subobj[part] = value
 
         else:
-            raise TypeError("invalid document type {0}".format(type(subobj)))
-
+            if part is None:
+                raise TypeError("invalid document type 
{0}".format(type(subobj)))
+            else:
+                raise JsonPatchConflict("unable to fully resolve json pointer 
{0}, part {1}".format(self.location, part))
         return obj
 
     def _on_undo_remove(self, path, key):
@@ -480,7 +482,10 @@
                 msg = "can't replace non-existent object '{0}'".format(part)
                 raise JsonPatchConflict(msg)
         else:
-            raise TypeError("invalid document type {0}".format(type(subobj)))
+            if part is None:
+                raise TypeError("invalid document type 
{0}".format(type(subobj)))
+            else:
+                raise JsonPatchConflict("unable to fully resolve json pointer 
{0}, part {1}".format(self.location, part))
 
         subobj[part] = value
         return obj
@@ -712,7 +717,7 @@
         index = self.take_index(item, _ST_REMOVE)
         if index is not None:
             op = index[2]
-            if type(op.key) == int:
+            if type(op.key) == int and type(key) == int:
                 for v in self.iter_from(index):
                     op.key = v._on_undo_remove(op.path, op.key)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpatch-1.23/setup.py new/jsonpatch-1.24/setup.py
--- old/jsonpatch-1.23/setup.py 2018-04-02 18:01:57.000000000 +0200
+++ new/jsonpatch-1.24/setup.py 2019-07-28 18:07:12.000000000 +0200
@@ -59,6 +59,7 @@
     'Programming Language :: Python :: 3.4',
     'Programming Language :: Python :: 3.5',
     'Programming Language :: Python :: 3.6',
+    'Programming Language :: Python :: 3.7',
     'Programming Language :: Python :: Implementation :: CPython',
     'Programming Language :: Python :: Implementation :: PyPy',
     'Topic :: Software Development :: Libraries',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpatch-1.23/tests.py new/jsonpatch-1.24/tests.py
--- old/jsonpatch-1.23/tests.py 2018-04-02 18:01:57.000000000 +0200
+++ new/jsonpatch-1.24/tests.py 2019-07-28 18:07:12.000000000 +0200
@@ -419,6 +419,15 @@
         new_from_patch = jsonpatch.apply_patch(old, patch)
         self.assertEqual(new, new_from_patch)
 
+    def test_move_from_numeric_to_alpha_dict_key(self):
+        #https://github.com/stefankoegl/python-json-patch/issues/97
+        src = {'13': 'x'}
+        dst = {'A': 'a', 'b': 'x'}
+        patch = jsonpatch.make_patch(src, dst)
+        res = jsonpatch.apply_patch(src, patch)
+        self.assertEqual(res, dst)
+
+
 
 class OptimizationTests(unittest.TestCase):
     def test_use_replace_instead_of_remove_add(self):


Reply via email to