Hello community, here is the log from the commit of package python-simplejson for openSUSE:Factory checked in at 2012-09-06 09:03:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-simplejson (Old) and /work/SRC/openSUSE:Factory/.python-simplejson.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-simplejson", Maintainer is "kkae...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/python-simplejson/python-simplejson.changes 2012-05-29 11:44:40.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-simplejson.new/python-simplejson.changes 2012-09-06 09:03:17.000000000 +0200 @@ -1,0 +2,8 @@ +Mon Sep 3 18:42:31 UTC 2012 - os-...@jacraig.com + +- Update to 2.6.1: + * raw_decode() now skips whitespace before the object +- Changes from 2.6.0: + * Error messages changed to match proposal for Python 3.3.1 + +------------------------------------------------------------------- Old: ---- simplejson-2.5.2.tar.gz New: ---- simplejson-2.6.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-simplejson.spec ++++++ --- /var/tmp/diff_new_pack.kZm10a/_old 2012-09-06 09:03:19.000000000 +0200 +++ /var/tmp/diff_new_pack.kZm10a/_new 2012-09-06 09:03:19.000000000 +0200 @@ -15,9 +15,10 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %define modname simplejson Name: python-%{modname} -Version: 2.5.2 +Version: 2.6.1 Release: 0 Url: http://github.com/simplejson/simplejson Summary: Simple, fast, extensible JSON encoder/decoder for Python ++++++ simplejson-2.5.2.tar.gz -> simplejson-2.6.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/simplejson-2.5.2/CHANGES.txt new/simplejson-2.6.1/CHANGES.txt --- old/simplejson-2.5.2/CHANGES.txt 2012-05-11 00:12:34.000000000 +0200 +++ new/simplejson-2.6.1/CHANGES.txt 2012-07-28 06:59:14.000000000 +0200 @@ -1,3 +1,13 @@ +Version 2.6.1 released 2012-07-27 + +* raw_decode() now skips whitespace before the object + https://github.com/simplejson/simplejson/pull/38 + +Version 2.6.0 released 2012-06-26 + +* Error messages changed to match proposal for Python 3.3.1 + http://bugs.python.org/issue5067 + Version 2.5.2 released 2012-05-10 * Fix for regression introduced in 2.5.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/simplejson-2.5.2/PKG-INFO new/simplejson-2.6.1/PKG-INFO --- old/simplejson-2.5.2/PKG-INFO 2012-05-11 00:12:41.000000000 +0200 +++ new/simplejson-2.6.1/PKG-INFO 2012-07-28 07:01:49.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: simplejson -Version: 2.5.2 +Version: 2.6.1 Summary: Simple, fast, extensible JSON encoder/decoder for Python Home-page: http://github.com/simplejson/simplejson Author: Bob Ippolito diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/simplejson-2.5.2/conf.py new/simplejson-2.6.1/conf.py --- old/simplejson-2.5.2/conf.py 2012-05-11 00:12:34.000000000 +0200 +++ new/simplejson-2.6.1/conf.py 2012-07-28 06:55:50.000000000 +0200 @@ -36,15 +36,15 @@ # General substitutions. project = 'simplejson' -copyright = '2011, Bob Ippolito' +copyright = '2012, Bob Ippolito' # The default replacements for |version| and |release|, also used in various # other places throughout the built documents. # # The short X.Y version. -version = '2.5' +version = '2.6' # The full version, including alpha/beta/rc tags. -release = '2.5.2' +release = '2.6.1' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/simplejson-2.5.2/index.rst new/simplejson-2.6.1/index.rst --- old/simplejson-2.5.2/index.rst 2012-03-29 21:02:31.000000000 +0200 +++ new/simplejson-2.6.1/index.rst 2012-07-28 06:58:11.000000000 +0200 @@ -41,7 +41,7 @@ Compact encoding:: >>> import simplejson as json - >>> json.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',',':')) + >>> json.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',', ':')) '[1,2,3,{"4":5,"6":7}]' Pretty printing:: @@ -116,7 +116,7 @@ "json": "obj" } $ echo '{ 1.2:3.4}' | python -m simplejson.tool - Expecting property name: line 1 column 2 (char 2) + Expecting property name enclosed in double quotes: line 1 column 2 (char 2) .. highlight:: python @@ -418,14 +418,16 @@ :exc:`JSONDecodeError` will be raised if the given JSON document is not valid. - .. method:: raw_decode(s) + .. method:: raw_decode(s[, idx=0]) Decode a JSON document from *s* (a :class:`str` or :class:`unicode` - beginning with a JSON document) and return a 2-tuple of the Python - representation and the index in *s* where the document ended. + beginning with a JSON document) starting from the index *idx* and return + a 2-tuple of the Python representation and the index in *s* where the + document ended. This can be used to decode a JSON document from a string that may have - extraneous data at the end. + extraneous data at the end, or to decode a string that has a series of + JSON objects. :exc:`JSONDecodeError` will be raised if the given JSON document is not valid. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/simplejson-2.5.2/setup.py new/simplejson-2.6.1/setup.py --- old/simplejson-2.5.2/setup.py 2012-05-11 00:12:34.000000000 +0200 +++ new/simplejson-2.6.1/setup.py 2012-07-28 06:55:46.000000000 +0200 @@ -7,7 +7,7 @@ DistutilsPlatformError IS_PYPY = hasattr(sys, 'pypy_translation_info') -VERSION = '2.5.2' +VERSION = '2.6.1' DESCRIPTION = "Simple, fast, extensible JSON encoder/decoder for Python" LONG_DESCRIPTION = open('README.rst', 'r').read() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/simplejson-2.5.2/simplejson/__init__.py new/simplejson-2.6.1/simplejson/__init__.py --- old/simplejson-2.5.2/simplejson/__init__.py 2012-05-11 00:12:34.000000000 +0200 +++ new/simplejson-2.6.1/simplejson/__init__.py 2012-07-28 06:55:40.000000000 +0200 @@ -97,7 +97,7 @@ $ echo '{ 1.2:3.4}' | python -m simplejson.tool Expecting property name: line 1 column 2 (char 2) """ -__version__ = '2.5.2' +__version__ = '2.6.1' __all__ = [ 'dump', 'dumps', 'load', 'loads', 'JSONDecoder', 'JSONDecodeError', 'JSONEncoder', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/simplejson-2.5.2/simplejson/_speedups.c new/simplejson-2.6.1/simplejson/_speedups.c --- old/simplejson-2.5.2/simplejson/_speedups.c 2012-05-11 00:12:34.000000000 +0200 +++ new/simplejson-2.6.1/simplejson/_speedups.c 2012-06-26 05:28:53.000000000 +0200 @@ -1058,7 +1058,9 @@ /* read key */ if (str[idx] != '"') { - raise_errmsg("Expecting property name", pystr, idx); + raise_errmsg( + "Expecting property name enclosed in double quotes", + pystr, idx); goto bail; } key = scanstring_str(pystr, idx + 1, encoding, strict, &next_idx); @@ -1079,7 +1081,7 @@ /* skip whitespace between key and : delimiter, read :, skip whitespace */ while (idx <= end_idx && IS_WHITESPACE(str[idx])) idx++; if (idx > end_idx || str[idx] != ':') { - raise_errmsg("Expecting : delimiter", pystr, idx); + raise_errmsg("Expecting ':' delimiter", pystr, idx); goto bail; } idx++; @@ -1119,7 +1121,7 @@ break; } else if (str[idx] != ',') { - raise_errmsg("Expecting , delimiter", pystr, idx); + raise_errmsg("Expecting ',' delimiter", pystr, idx); goto bail; } idx++; @@ -1204,7 +1206,9 @@ /* read key */ if (str[idx] != '"') { - raise_errmsg("Expecting property name", pystr, idx); + raise_errmsg( + "Expecting property name enclosed in double quotes", + pystr, idx); goto bail; } key = scanstring_unicode(pystr, idx + 1, strict, &next_idx); @@ -1222,10 +1226,11 @@ } idx = next_idx; - /* skip whitespace between key and : delimiter, read :, skip whitespace */ + /* skip whitespace between key and : delimiter, read :, skip + whitespace */ while (idx <= end_idx && IS_WHITESPACE(str[idx])) idx++; if (idx > end_idx || str[idx] != ':') { - raise_errmsg("Expecting : delimiter", pystr, idx); + raise_errmsg("Expecting ':' delimiter", pystr, idx); goto bail; } idx++; @@ -1259,13 +1264,14 @@ /* skip whitespace before } or , */ while (idx <= end_idx && IS_WHITESPACE(str[idx])) idx++; - /* bail if the object is closed or we didn't get the , delimiter */ + /* bail if the object is closed or we didn't get the , + delimiter */ if (idx > end_idx) break; if (str[idx] == '}') { break; } else if (str[idx] != ',') { - raise_errmsg("Expecting , delimiter", pystr, idx); + raise_errmsg("Expecting ',' delimiter", pystr, idx); goto bail; } idx++; @@ -1359,7 +1365,7 @@ break; } else if (str[idx] != ',') { - raise_errmsg("Expecting , delimiter", pystr, idx); + raise_errmsg("Expecting ',' delimiter", pystr, idx); goto bail; } idx++; @@ -1431,7 +1437,7 @@ break; } else if (str[idx] != ',') { - raise_errmsg("Expecting , delimiter", pystr, idx); + raise_errmsg("Expecting ',' delimiter", pystr, idx); goto bail; } idx++; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/simplejson-2.5.2/simplejson/decoder.py new/simplejson-2.6.1/simplejson/decoder.py --- old/simplejson-2.5.2/simplejson/decoder.py 2011-09-29 21:25:07.000000000 +0200 +++ new/simplejson-2.6.1/simplejson/decoder.py 2012-07-28 06:54:07.000000000 +0200 @@ -203,7 +203,9 @@ pairs = object_hook(pairs) return pairs, end + 1 elif nextchar != '"': - raise JSONDecodeError("Expecting property name", s, end) + raise JSONDecodeError( + "Expecting property name enclosed in double quotes", + s, end) end += 1 while True: key, end = scanstring(s, end, encoding, strict) @@ -214,7 +216,7 @@ if s[end:end + 1] != ':': end = _w(s, end).end() if s[end:end + 1] != ':': - raise JSONDecodeError("Expecting : delimiter", s, end) + raise JSONDecodeError("Expecting ':' delimiter", s, end) end += 1 @@ -244,7 +246,7 @@ if nextchar == '}': break elif nextchar != ',': - raise JSONDecodeError("Expecting , delimiter", s, end - 1) + raise JSONDecodeError("Expecting ',' delimiter", s, end - 1) try: nextchar = s[end] @@ -259,7 +261,9 @@ end += 1 if nextchar != '"': - raise JSONDecodeError("Expecting property name", s, end - 1) + raise JSONDecodeError( + "Expecting property name enclosed in double quotes", + s, end - 1) if object_pairs_hook is not None: result = object_pairs_hook(pairs) @@ -293,7 +297,7 @@ if nextchar == ']': break elif nextchar != ',': - raise JSONDecodeError("Expecting , delimiter", s, end) + raise JSONDecodeError("Expecting ',' delimiter", s, end) try: if s[end] in _ws: @@ -399,23 +403,25 @@ instance containing a JSON document) """ - obj, end = self.raw_decode(s, idx=_w(s, 0).end()) + obj, end = self.raw_decode(s) end = _w(s, end).end() if end != len(s): raise JSONDecodeError("Extra data", s, end, len(s)) return obj - def raw_decode(self, s, idx=0): + def raw_decode(self, s, idx=0, _w=WHITESPACE.match): """Decode a JSON document from ``s`` (a ``str`` or ``unicode`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. + Optionally, ``idx`` can be used to specify an offset in ``s`` where + the JSON document begins. This can be used to decode a JSON document from a string that may have extraneous data at the end. """ try: - obj, end = self.scan_once(s, idx) + obj, end = self.scan_once(s, idx=_w(s, idx).end()) except StopIteration: raise JSONDecodeError("No JSON object could be decoded", s, idx) return obj, end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/simplejson-2.5.2/simplejson/tests/test_decode.py new/simplejson-2.6.1/simplejson/tests/test_decode.py --- old/simplejson-2.5.2/simplejson/tests/test_decode.py 2011-03-11 18:03:40.000000000 +0100 +++ new/simplejson-2.6.1/simplejson/tests/test_decode.py 2012-07-28 06:51:55.000000000 +0200 @@ -81,3 +81,7 @@ self.assertEqual( ({'a': {}}, 9), cls(object_pairs_hook=dict).raw_decode("{\"a\": {}}")) + # https://github.com/simplejson/simplejson/pull/38 + self.assertEqual( + ({'a': {}}, 11), + cls().raw_decode(" \n{\"a\": {}}")) -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org