Hello community,

here is the log from the commit of package python-jsonpointer for 
openSUSE:Factory checked in at 2015-02-12 10:22:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jsonpointer (Old)
 and      /work/SRC/openSUSE:Factory/.python-jsonpointer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-jsonpointer"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jsonpointer/python-jsonpointer.changes    
2014-11-18 22:45:31.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-jsonpointer.new/python-jsonpointer.changes   
    2015-02-12 10:22:47.000000000 +0100
@@ -1,0 +2,15 @@
+Wed Feb  4 14:17:13 UTC 2015 - [email protected]
+
+- update to version 1.7:
+   * bump version to 1.7
+   * Fix ``jsonpointer`` commandline utility (#14)
+   * bump version to 1.6
+   * Fix contains unexpected false return
+   * bump version to 1.5
+   * Use ABCs instead of list/dict
+   * Convert readme from markdown to rst for PyPI
+   * Add support for Python 3.4, pypy3, use travis_retry
+   * Add dependencies for creating wheels
+- Requires(pre) coreutils to have "rm" command available (bnc#916277)
+
+-------------------------------------------------------------------

Old:
----
  jsonpointer-1.4.tar.gz

New:
----
  jsonpointer-1.7.tar.gz

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

Other differences:
------------------
++++++ python-jsonpointer.spec ++++++
--- /var/tmp/diff_new_pack.WKkZCv/_old  2015-02-12 10:22:48.000000000 +0100
+++ /var/tmp/diff_new_pack.WKkZCv/_new  2015-02-12 10:22:48.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-jsonpointer
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 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
@@ -17,7 +17,7 @@
 
 
 Name:           python-jsonpointer
-Version:        1.4
+Version:        1.7
 Release:        0
 Summary:        Identify specific nodes in a JSON document (according to draft 
08)
 License:        BSD-3-Clause
@@ -25,8 +25,10 @@
 Url:            https://github.com/stefankoegl/python-json-pointer
 Source:         
http://pypi.python.org/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
 BuildRequires:  python-devel
+BuildRequires:  python-setuptools
 Requires(post):   update-alternatives
 Requires(postun): update-alternatives
+Requires(pre):    coreutils
 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()")}

++++++ jsonpointer-1.4.tar.gz -> jsonpointer-1.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpointer-1.4/MANIFEST.in 
new/jsonpointer-1.7/MANIFEST.in
--- old/jsonpointer-1.4/MANIFEST.in     1970-01-01 01:00:00.000000000 +0100
+++ new/jsonpointer-1.7/MANIFEST.in     2013-11-22 16:20:03.000000000 +0100
@@ -0,0 +1,4 @@
+include AUTHORS
+include COPYING
+include README.md
+include tests.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpointer-1.4/PKG-INFO new/jsonpointer-1.7/PKG-INFO
--- old/jsonpointer-1.4/PKG-INFO        2014-07-03 22:01:21.000000000 +0200
+++ new/jsonpointer-1.7/PKG-INFO        2014-12-14 19:25:56.000000000 +0100
@@ -1,12 +1,28 @@
 Metadata-Version: 1.1
 Name: jsonpointer
-Version: 1.4
+Version: 1.7
 Summary:  Identify specific nodes in a JSON document (RFC 6901) 
 Home-page: https://github.com/stefankoegl/python-json-pointer
 Author: Stefan Kögl
 Author-email: [email protected]
 License: Modified BSD License
-Description: UNKNOWN
+Description: python-json-pointer [![Build 
Status](https://secure.travis-ci.org/stefankoegl/python-json-pointer.png?branch=master)](https://travis-ci.org/stefankoegl/python-json-pointer)
 [![Coverage 
Status](https://coveralls.io/repos/stefankoegl/python-json-pointer/badge.png?branch=master)](https://coveralls.io/r/stefankoegl/python-json-pointer?branch=master)
 ![Downloads](https://pypip.in/d/jsonpointer/badge.png) 
![Version](https://pypip.in/v/jsonpointer/badge.png)
+        ===================
+        
+        Resolve JSON Pointers in Python
+        -------------------------------
+        
+        Library to resolve JSON Pointers according to
+        [RFC 6901](http://tools.ietf.org/html/rfc6901)
+        
+        See Sourcecode for Examples
+        * Website: https://github.com/stefankoegl/python-json-pointer
+        * Repository: https://github.com/stefankoegl/python-json-pointer.git
+        * Documentation: https://python-json-pointer.readthedocs.org/
+        * PyPI: https://pypi.python.org/pypi/jsonpointer
+        * Travis-CI: https://travis-ci.org/stefankoegl/python-json-pointer
+        * Coveralls: https://coveralls.io/r/stefankoegl/python-json-pointer
+        
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: Console
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpointer-1.4/jsonpointer.egg-info/PKG-INFO 
new/jsonpointer-1.7/jsonpointer.egg-info/PKG-INFO
--- old/jsonpointer-1.4/jsonpointer.egg-info/PKG-INFO   1970-01-01 
01:00:00.000000000 +0100
+++ new/jsonpointer-1.7/jsonpointer.egg-info/PKG-INFO   2014-12-14 
19:25:56.000000000 +0100
@@ -0,0 +1,43 @@
+Metadata-Version: 1.1
+Name: jsonpointer
+Version: 1.7
+Summary:  Identify specific nodes in a JSON document (RFC 6901) 
+Home-page: https://github.com/stefankoegl/python-json-pointer
+Author: Stefan Kögl
+Author-email: [email protected]
+License: Modified BSD License
+Description: python-json-pointer [![Build 
Status](https://secure.travis-ci.org/stefankoegl/python-json-pointer.png?branch=master)](https://travis-ci.org/stefankoegl/python-json-pointer)
 [![Coverage 
Status](https://coveralls.io/repos/stefankoegl/python-json-pointer/badge.png?branch=master)](https://coveralls.io/r/stefankoegl/python-json-pointer?branch=master)
 ![Downloads](https://pypip.in/d/jsonpointer/badge.png) 
![Version](https://pypip.in/v/jsonpointer/badge.png)
+        ===================
+        
+        Resolve JSON Pointers in Python
+        -------------------------------
+        
+        Library to resolve JSON Pointers according to
+        [RFC 6901](http://tools.ietf.org/html/rfc6901)
+        
+        See Sourcecode for Examples
+        * Website: https://github.com/stefankoegl/python-json-pointer
+        * Repository: https://github.com/stefankoegl/python-json-pointer.git
+        * Documentation: https://python-json-pointer.readthedocs.org/
+        * PyPI: https://pypi.python.org/pypi/jsonpointer
+        * Travis-CI: https://travis-ci.org/stefankoegl/python-json-pointer
+        * Coveralls: https://coveralls.io/r/stefankoegl/python-json-pointer
+        
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Console
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development :: Libraries
+Classifier: Topic :: Utilities
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpointer-1.4/jsonpointer.egg-info/SOURCES.txt 
new/jsonpointer-1.7/jsonpointer.egg-info/SOURCES.txt
--- old/jsonpointer-1.4/jsonpointer.egg-info/SOURCES.txt        1970-01-01 
01:00:00.000000000 +0100
+++ new/jsonpointer-1.7/jsonpointer.egg-info/SOURCES.txt        2014-12-14 
19:25:56.000000000 +0100
@@ -0,0 +1,12 @@
+AUTHORS
+COPYING
+MANIFEST.in
+README.md
+jsonpointer.py
+setup.py
+tests.py
+bin/jsonpointer
+jsonpointer.egg-info/PKG-INFO
+jsonpointer.egg-info/SOURCES.txt
+jsonpointer.egg-info/dependency_links.txt
+jsonpointer.egg-info/top_level.txt
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/jsonpointer-1.4/jsonpointer.egg-info/dependency_links.txt 
new/jsonpointer-1.7/jsonpointer.egg-info/dependency_links.txt
--- old/jsonpointer-1.4/jsonpointer.egg-info/dependency_links.txt       
1970-01-01 01:00:00.000000000 +0100
+++ new/jsonpointer-1.7/jsonpointer.egg-info/dependency_links.txt       
2014-12-14 19:25:56.000000000 +0100
@@ -0,0 +1 @@
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpointer-1.4/jsonpointer.egg-info/top_level.txt 
new/jsonpointer-1.7/jsonpointer.egg-info/top_level.txt
--- old/jsonpointer-1.4/jsonpointer.egg-info/top_level.txt      1970-01-01 
01:00:00.000000000 +0100
+++ new/jsonpointer-1.7/jsonpointer.egg-info/top_level.txt      2014-12-14 
19:25:56.000000000 +0100
@@ -0,0 +1 @@
+jsonpointer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpointer-1.4/jsonpointer.py 
new/jsonpointer-1.7/jsonpointer.py
--- old/jsonpointer-1.4/jsonpointer.py  2014-07-03 21:58:11.000000000 +0200
+++ new/jsonpointer-1.7/jsonpointer.py  2014-12-14 19:25:08.000000000 +0100
@@ -34,9 +34,14 @@
 
 """ Identify specific nodes in a JSON document (RFC 6901) """
 
+try:
+    from collections.abc import Mapping, Sequence
+except ImportError:
+    from collections import Mapping, Sequence
+
 # Will be parsed by setup.py to determine package metadata
 __author__ = 'Stefan Kögl <[email protected]>'
-__version__ = '1.4'
+__version__ = '1.7'
 __website__ = 'https://github.com/stefankoegl/python-json-pointer'
 __license__ = 'Modified BSD License'
 
@@ -191,10 +196,10 @@
     def get_part(self, doc, part):
         """ Returns the next step in the correct type """
 
-        if isinstance(doc, dict):
+        if isinstance(doc, Mapping):
             return part
 
-        elif isinstance(doc, list):
+        elif isinstance(doc, Sequence):
 
             if part == '-':
                 return part
@@ -220,14 +225,14 @@
 
         assert (type(doc) in (dict, list) or hasattr(doc, '__getitem__')), 
"invalid document type %s" % (type(doc),)
 
-        if isinstance(doc, dict):
+        if isinstance(doc, Mapping):
             try:
                 return doc[part]
 
             except KeyError:
                 raise JsonPointerException("member '%s' not found in %s" % 
(part, doc))
 
-        elif isinstance(doc, list):
+        elif isinstance(doc, Sequence):
 
             if part == '-':
                 return EndOfList(doc)
@@ -243,9 +248,12 @@
             return doc[part]
 
     def contains(self, ptr):
-        """ Returns True if self contains the given ptr """
-        return len(self.parts) > len(ptr.parts) and \
-             self.parts[:len(ptr.parts)] == ptr.parts
+        """Returns True if self contains the given ptr"""
+        return self.parts[:len(ptr.parts)] == ptr.parts
+
+    def __contains__(self, item):
+        """Returns True if self contains the given ptr"""
+        return self.contains(item)
 
     @property
     def path(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpointer-1.4/setup.cfg 
new/jsonpointer-1.7/setup.cfg
--- old/jsonpointer-1.4/setup.cfg       1970-01-01 01:00:00.000000000 +0100
+++ new/jsonpointer-1.7/setup.cfg       2014-12-14 19:25:56.000000000 +0100
@@ -0,0 +1,5 @@
+[egg_info]
+tag_build = 
+tag_date = 0
+tag_svn_revision = 0
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpointer-1.4/setup.py new/jsonpointer-1.7/setup.py
--- old/jsonpointer-1.4/setup.py        2014-06-30 22:35:12.000000000 +0200
+++ new/jsonpointer-1.7/setup.py        2014-12-14 19:18:17.000000000 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-from distutils.core import setup
+from setuptools import setup
 import re
 import io
 import os.path
@@ -26,6 +26,14 @@
 # Extract name and e-mail ("Firstname Lastname <[email protected]>")
 AUTHOR, EMAIL = re.match(r'(.*) <(.*)>', AUTHOR_EMAIL).groups()
 
+try:
+    from pypandoc import convert
+    read_md = lambda f: convert(f, 'rst')
+except ImportError:
+    print('warning: pypandoc module not found, could not convert '
+          'Markdown to RST')
+    read_md = lambda f: open(f, 'r').read()
+
 CLASSIFIERS = [
     'Development Status :: 5 - Production/Stable',
     'Environment :: Console',
@@ -49,15 +57,12 @@
 setup(name=PACKAGE,
       version=VERSION,
       description=DESCRIPTION,
+      long_description=read_md('README.md'),
       author=AUTHOR,
       author_email=EMAIL,
       license=LICENSE,
       url=WEBSITE,
       py_modules=MODULES,
       scripts=['bin/jsonpointer'],
-      entry_points = {
-        'console_scripts': [
-            'jsonpointer = jsonpointer:main',
-      ]},
       classifiers=CLASSIFIERS,
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/jsonpointer-1.4/tests.py new/jsonpointer-1.7/tests.py
--- old/jsonpointer-1.4/tests.py        2014-03-30 10:45:48.000000000 +0200
+++ new/jsonpointer-1.7/tests.py        2014-11-14 20:59:05.000000000 +0100
@@ -72,6 +72,11 @@
 
 class ComparisonTests(unittest.TestCase):
 
+    def setUp(self):
+        self.ptr1 = JsonPointer("/a/b/c")
+        self.ptr2 = JsonPointer("/a/b")
+        self.ptr3 = JsonPointer("/b/c")
+
     def test_eq_hash(self):
         p1 = JsonPointer("/something/1/b")
         p2 = JsonPointer("/something/1/b")
@@ -89,13 +94,16 @@
         self.assertFalse(p1 == "/something/1/b")
 
     def test_contains(self):
-        p1 = JsonPointer("/a/b/c")
-        p2 = JsonPointer("/a/b")
-        p3 = JsonPointer("/b/c")
-
-        self.assertTrue(p1.contains(p2))
-        self.assertFalse(p1.contains(p3))
 
+        self.assertTrue(self.ptr1.contains(self.ptr2))
+        self.assertTrue(self.ptr1.contains(self.ptr1))
+        self.assertFalse(self.ptr1.contains(self.ptr3))
+
+    def test_contains_magic(self):
+
+        self.assertTrue(self.ptr2 in self.ptr1)
+        self.assertTrue(self.ptr1 in self.ptr1)
+        self.assertFalse(self.ptr3 in self.ptr1)
 
 
 class WrongInputTests(unittest.TestCase):

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

Reply via email to