Hello community,
here is the log from the commit of package python-jsonpath-rw for
openSUSE:Factory checked in at 2015-05-10 10:46:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jsonpath-rw (Old)
and /work/SRC/openSUSE:Factory/.python-jsonpath-rw.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-jsonpath-rw"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-jsonpath-rw/python-jsonpath-rw.changes
2014-01-09 15:32:00.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.python-jsonpath-rw.new/python-jsonpath-rw.changes
2015-05-10 10:46:39.000000000 +0200
@@ -1,0 +2,12 @@
+Wed May 6 17:54:26 UTC 2015 - [email protected]
+
+- update to version 1.4.0:
+ * no changelog available
+- shorten the summary to fix an rpmlint error
+- add python-ply and python-six as BuildRequires to ensure their
+ availability
+- remove python-decorator from Requires: unneeded
+- remove unwanted shebang in jsonpath.py
+- add jsonpath.py to the package files
+
+-------------------------------------------------------------------
Old:
----
jsonpath-rw-1.2.3.tar.gz
New:
----
jsonpath-rw-1.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-jsonpath-rw.spec ++++++
--- /var/tmp/diff_new_pack.RGGQCF/_old 2015-05-10 10:46:39.000000000 +0200
+++ /var/tmp/diff_new_pack.RGGQCF/_new 2015-05-10 10:46:39.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-jsonpath-rw
#
-# 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,20 +17,21 @@
Name: python-jsonpath-rw
-Version: 1.2.3
+Version: 1.4.0
Release: 0
-Summary: A robust and significantly extended implementation of JSONPath
for Python, with a clear AST for metaprogramming
+Summary: An extended implementation of JSONPath for Python
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/kennknowles/python-jsonpath-rw
Source:
https://pypi.python.org/packages/source/j/jsonpath-rw/jsonpath-rw-%{version}.tar.gz
BuildRequires: python-devel
+BuildRequires: python-ply
BuildRequires: python-setuptools
+BuildRequires: python-six
Requires: python-ply
Requires: python-six
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-Requires: python-decorator
%{!?python_sitelib: %global python_sitelib %(python -c "from
distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
@@ -47,6 +48,8 @@
%prep
%setup -q -n jsonpath-rw-%{version}
+# remove unwanted shebang
+sed -i '/^#!/ d' jsonpath_rw/bin/jsonpath.py
%build
python setup.py build
@@ -57,6 +60,7 @@
%files
%defattr(-,root,root,-)
%doc README.rst
+%{_bindir}/jsonpath.py
%{python_sitelib}/*
%changelog
++++++ jsonpath-rw-1.2.3.tar.gz -> jsonpath-rw-1.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jsonpath-rw-1.2.3/PKG-INFO
new/jsonpath-rw-1.4.0/PKG-INFO
--- old/jsonpath-rw-1.2.3/PKG-INFO 2013-12-18 16:57:20.000000000 +0100
+++ new/jsonpath-rw-1.4.0/PKG-INFO 2015-04-19 03:47:14.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: jsonpath-rw
-Version: 1.2.3
+Version: 1.4.0
Summary: A robust and significantly extended implementation of JSONPath for
Python, with a clear AST for metaprogramming.
Home-page: https://github.com/kennknowles/python-jsonpath-rw
Author: Kenneth Knowles
@@ -14,7 +14,8 @@
|Build Status| |Test coverage| |PyPi version| |PyPi downloads|
This library provides a robust and significantly extended
implementation
- of JSONPath for Python. It is tested with Python 2.6, 2.7, 3.2, 3.3,
and PyPy.
+ of JSONPath for Python. It is tested with Python 2.6, 2.7, 3.2, 3.3.
+ *(On travis-ci there is a segfault when running the tests with pypy; I
don't think the problem lies with this library)*.
This library differs from other JSONPath implementations in that it is
a
full *language* implementation, meaning the JSONPath expressions are
@@ -32,7 +33,7 @@
Then:
- ::
+ .. code:: python
$ python
@@ -59,6 +60,9 @@
['number two', 'number one']
# You can also build expressions directly quite easily
+ >>> from jsonpath_rw.jsonpath import Fields
+ >>> from jsonpath_rw.jsonpath import Slice
+
>>> jsonpath_expr_direct =
Fields('foo').child(Slice('*')).child(Fields('baz')) # This is equivalent
JSONPath Syntax
@@ -103,9 +107,8 @@
+-------------------------------------+------------------------------------------------------------------------------------+
| *jsonpath1* ``where`` *jsonpath2* | Any nodes matching *jsonpath1*
with a child matching *jsonpath2* |
+-------------------------------------+------------------------------------------------------------------------------------+
-
- Also *jsonpath1* ``|`` *jsonpath2* for union (but I have not convinced
- Github-Flavored Markdown to allow me to put that in a table)
+ | *jsonpath1* ``|`` *jsonpath2* | Any nodes matching the union
of *jsonpath1* and *jsonpath2* |
+
+-------------------------------------+------------------------------------------------------------------------------------+
Field specifiers ( *field* ):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jsonpath-rw-1.2.3/README.rst
new/jsonpath-rw-1.4.0/README.rst
--- old/jsonpath-rw-1.2.3/README.rst 2013-12-18 16:56:31.000000000 +0100
+++ new/jsonpath-rw-1.4.0/README.rst 2015-04-19 03:34:46.000000000 +0200
@@ -6,7 +6,8 @@
|Build Status| |Test coverage| |PyPi version| |PyPi downloads|
This library provides a robust and significantly extended implementation
-of JSONPath for Python. It is tested with Python 2.6, 2.7, 3.2, 3.3, and PyPy.
+of JSONPath for Python. It is tested with Python 2.6, 2.7, 3.2, 3.3.
+*(On travis-ci there is a segfault when running the tests with pypy; I don't
think the problem lies with this library)*.
This library differs from other JSONPath implementations in that it is a
full *language* implementation, meaning the JSONPath expressions are
@@ -24,7 +25,7 @@
Then:
-::
+.. code:: python
$ python
@@ -51,6 +52,9 @@
['number two', 'number one']
# You can also build expressions directly quite easily
+ >>> from jsonpath_rw.jsonpath import Fields
+ >>> from jsonpath_rw.jsonpath import Slice
+
>>> jsonpath_expr_direct =
Fields('foo').child(Slice('*')).child(Fields('baz')) # This is equivalent
JSONPath Syntax
@@ -95,9 +99,8 @@
+-------------------------------------+------------------------------------------------------------------------------------+
| *jsonpath1* ``where`` *jsonpath2* | Any nodes matching *jsonpath1* with a
child matching *jsonpath2* |
+-------------------------------------+------------------------------------------------------------------------------------+
-
-Also *jsonpath1* ``|`` *jsonpath2* for union (but I have not convinced
-Github-Flavored Markdown to allow me to put that in a table)
+| *jsonpath1* ``|`` *jsonpath2* | Any nodes matching the union of
*jsonpath1* and *jsonpath2* |
++-------------------------------------+------------------------------------------------------------------------------------+
Field specifiers ( *field* ):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jsonpath-rw-1.2.3/jsonpath_rw/__init__.py
new/jsonpath-rw-1.4.0/jsonpath_rw/__init__.py
--- old/jsonpath-rw-1.2.3/jsonpath_rw/__init__.py 2013-12-18
16:56:08.000000000 +0100
+++ new/jsonpath-rw-1.4.0/jsonpath_rw/__init__.py 2014-02-08
01:41:44.000000000 +0100
@@ -1,4 +1,4 @@
from .jsonpath import *
from .parser import parse
-__version__ = '1.2.3'
+__version__ = '1.3.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jsonpath-rw-1.2.3/jsonpath_rw/bin/jsonpath.py
new/jsonpath-rw-1.4.0/jsonpath_rw/bin/jsonpath.py
--- old/jsonpath-rw-1.2.3/jsonpath_rw/bin/jsonpath.py 1970-01-01
01:00:00.000000000 +0100
+++ new/jsonpath-rw-1.4.0/jsonpath_rw/bin/jsonpath.py 2014-02-08
01:34:04.000000000 +0100
@@ -0,0 +1,71 @@
+#!/usr/bin/python
+# encoding: utf-8
+# Copyright © 2012 Felix Richter <[email protected]>
+# This work is free. You can redistribute it and/or modify it under the
+# terms of the Do What The Fuck You Want To Public License, Version 2,
+# as published by Sam Hocevar. See the COPYING file for more details.
+
+# Use modern Python
+from __future__ import unicode_literals, print_function, absolute_import
+
+# Standard Library imports
+import json
+import sys
+import glob
+import argparse
+
+# JsonPath-RW imports
+from jsonpath_rw import parse
+
+def find_matches_for_file(expr, f):
+ return expr.find(json.load(f))
+
+def print_matches(matches):
+ print('\n'.join(['{0}'.format(match.value) for match in matches]))
+
+
+def main(*argv):
+ parser = argparse.ArgumentParser(
+ description='Search JSON files (or stdin) according to a JSONPath
expression.',
+ formatter_class=argparse.RawTextHelpFormatter,
+ epilog="""
+ Quick JSONPath reference (see more at
https://github.com/kennknowles/python-jsonpath-rw)
+
+ atomics:
+ $ - root object
+ `this` - current object
+
+ operators:
+ path1.path2 - same as xpath /
+ path1|path2 - union
+ path1..path2 - somewhere in between
+
+ fields:
+ fieldname - field with name
+ * - any field
+ [_start_?:_end_?] - array slice
+ [*] - any array index
+ """)
+
+
+
+ parser.add_argument('expression', help='A JSONPath expression.')
+ parser.add_argument('files', metavar='file', nargs='*', help='Files to
search (if none, searches stdin)')
+
+ args = parser.parse_args(argv[1:])
+
+ expr = parse(args.expression)
+ glob_patterns = args.files
+
+ if len(glob_patterns) == 0:
+ # stdin mode
+ print_matches(find_matches_for_file(expr, sys.stdin))
+ else:
+ # file paths mode
+ for pattern in glob_patterns:
+ for filename in glob.glob(pattern):
+ with open(filename) as f:
+ print_matches(find_matches_for_file(expr, f))
+
+def entry_point():
+ main(*sys.argv)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jsonpath-rw-1.2.3/jsonpath_rw/jsonpath.py
new/jsonpath-rw-1.4.0/jsonpath_rw/jsonpath.py
--- old/jsonpath-rw-1.2.3/jsonpath_rw/jsonpath.py 2013-06-15
00:06:46.000000000 +0200
+++ new/jsonpath-rw-1.4.0/jsonpath_rw/jsonpath.py 2015-04-19
03:34:46.000000000 +0200
@@ -272,7 +272,7 @@
self.right = right
def find(self, data):
- return [subdata for subdata in self.left.find(data) if
self.right.find(data)]
+ return [subdata for subdata in self.left.find(data) if
self.right.find(subdata)]
def __str__(self):
return '%s where %s' % (self.left, self.right)
@@ -416,7 +416,7 @@
if field_datum is not None]
def __str__(self):
- return ','.join(self.fields)
+ return ','.join(map(str, self.fields))
def __repr__(self):
return '%s(%s)' % (self.__class__.__name__, ','.join(map(repr,
self.fields)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jsonpath-rw-1.2.3/jsonpath_rw.egg-info/PKG-INFO
new/jsonpath-rw-1.4.0/jsonpath_rw.egg-info/PKG-INFO
--- old/jsonpath-rw-1.2.3/jsonpath_rw.egg-info/PKG-INFO 2013-12-18
16:57:20.000000000 +0100
+++ new/jsonpath-rw-1.4.0/jsonpath_rw.egg-info/PKG-INFO 2015-04-19
03:47:13.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: jsonpath-rw
-Version: 1.2.3
+Version: 1.4.0
Summary: A robust and significantly extended implementation of JSONPath for
Python, with a clear AST for metaprogramming.
Home-page: https://github.com/kennknowles/python-jsonpath-rw
Author: Kenneth Knowles
@@ -14,7 +14,8 @@
|Build Status| |Test coverage| |PyPi version| |PyPi downloads|
This library provides a robust and significantly extended
implementation
- of JSONPath for Python. It is tested with Python 2.6, 2.7, 3.2, 3.3,
and PyPy.
+ of JSONPath for Python. It is tested with Python 2.6, 2.7, 3.2, 3.3.
+ *(On travis-ci there is a segfault when running the tests with pypy; I
don't think the problem lies with this library)*.
This library differs from other JSONPath implementations in that it is
a
full *language* implementation, meaning the JSONPath expressions are
@@ -32,7 +33,7 @@
Then:
- ::
+ .. code:: python
$ python
@@ -59,6 +60,9 @@
['number two', 'number one']
# You can also build expressions directly quite easily
+ >>> from jsonpath_rw.jsonpath import Fields
+ >>> from jsonpath_rw.jsonpath import Slice
+
>>> jsonpath_expr_direct =
Fields('foo').child(Slice('*')).child(Fields('baz')) # This is equivalent
JSONPath Syntax
@@ -103,9 +107,8 @@
+-------------------------------------+------------------------------------------------------------------------------------+
| *jsonpath1* ``where`` *jsonpath2* | Any nodes matching *jsonpath1*
with a child matching *jsonpath2* |
+-------------------------------------+------------------------------------------------------------------------------------+
-
- Also *jsonpath1* ``|`` *jsonpath2* for union (but I have not convinced
- Github-Flavored Markdown to allow me to put that in a table)
+ | *jsonpath1* ``|`` *jsonpath2* | Any nodes matching the union
of *jsonpath1* and *jsonpath2* |
+
+-------------------------------------+------------------------------------------------------------------------------------+
Field specifiers ( *field* ):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jsonpath-rw-1.2.3/jsonpath_rw.egg-info/SOURCES.txt
new/jsonpath-rw-1.4.0/jsonpath_rw.egg-info/SOURCES.txt
--- old/jsonpath-rw-1.2.3/jsonpath_rw.egg-info/SOURCES.txt 2013-12-18
16:57:20.000000000 +0100
+++ new/jsonpath-rw-1.4.0/jsonpath_rw.egg-info/SOURCES.txt 2015-04-19
03:47:13.000000000 +0200
@@ -7,5 +7,8 @@
jsonpath_rw.egg-info/PKG-INFO
jsonpath_rw.egg-info/SOURCES.txt
jsonpath_rw.egg-info/dependency_links.txt
+jsonpath_rw.egg-info/entry_points.txt
jsonpath_rw.egg-info/requires.txt
-jsonpath_rw.egg-info/top_level.txt
\ No newline at end of file
+jsonpath_rw.egg-info/top_level.txt
+jsonpath_rw/bin/__init__.py
+jsonpath_rw/bin/jsonpath.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/jsonpath-rw-1.2.3/jsonpath_rw.egg-info/entry_points.txt
new/jsonpath-rw-1.4.0/jsonpath_rw.egg-info/entry_points.txt
--- old/jsonpath-rw-1.2.3/jsonpath_rw.egg-info/entry_points.txt 1970-01-01
01:00:00.000000000 +0100
+++ new/jsonpath-rw-1.4.0/jsonpath_rw.egg-info/entry_points.txt 2015-04-19
03:47:13.000000000 +0200
@@ -0,0 +1,3 @@
+[console_scripts]
+jsonpath.py = jsonpath_rw.bin.jsonpath:entry_point
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jsonpath-rw-1.2.3/jsonpath_rw.egg-info/requires.txt
new/jsonpath-rw-1.4.0/jsonpath_rw.egg-info/requires.txt
--- old/jsonpath-rw-1.2.3/jsonpath_rw.egg-info/requires.txt 2013-12-18
16:57:20.000000000 +0100
+++ new/jsonpath-rw-1.4.0/jsonpath_rw.egg-info/requires.txt 2015-04-19
03:47:13.000000000 +0200
@@ -1,3 +1,3 @@
ply
decorator
-six
\ No newline at end of file
+six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/jsonpath-rw-1.2.3/setup.py
new/jsonpath-rw-1.4.0/setup.py
--- old/jsonpath-rw-1.2.3/setup.py 2013-12-18 16:56:49.000000000 +0100
+++ new/jsonpath-rw-1.4.0/setup.py 2015-04-19 03:39:01.000000000 +0200
@@ -6,14 +6,17 @@
setuptools.setup(
name='jsonpath-rw',
- version='1.2.3',
+ version='1.4.0',
description='A robust and significantly extended implementation of
JSONPath for Python, with a clear AST for metaprogramming.',
author='Kenneth Knowles',
author_email='[email protected]',
url='https://github.com/kennknowles/python-jsonpath-rw',
license='Apache 2.0',
long_description=io.open('README.rst', encoding='utf-8').read(),
- packages = ['jsonpath_rw'],
+ packages = ['jsonpath_rw', 'jsonpath_rw.bin'],
+ entry_points = {
+ 'console_scripts': ['jsonpath.py =
jsonpath_rw.bin.jsonpath:entry_point'],
+ },
test_suite = 'tests',
install_requires = [ 'ply', 'decorator', 'six' ],
classifiers = [