Hello community,

here is the log from the commit of package python-simplejson for 
openSUSE:Factory checked in at 2018-05-11 11:26:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-simplejson (Old)
 and      /work/SRC/openSUSE:Factory/.python-simplejson.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-simplejson"

Fri May 11 11:26:09 2018 rev:38 rq:605123 version:3.14.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-simplejson/python-simplejson.changes      
2017-12-02 13:11:22.732824674 +0100
+++ /work/SRC/openSUSE:Factory/.python-simplejson.new/python-simplejson.changes 
2018-05-11 11:26:13.600860187 +0200
@@ -1,0 +2,14 @@
+Sun May  6 05:46:54 UTC 2018 - a...@gmx.de
+
+- specfile:
+  * update copyright year
+
+- update to version 3.14.0:
+  * Defer is_raw_json test (performance improvement)
+    https://github.com/simplejson/simplejson/pull/212
+  * Avoid escaping U+2028 and U+2029 without ensure_ascii
+    https://github.com/simplejson/simplejson/pull/211
+  * Fix an incorrect type test in Python 2, avoiding an unnecessary
+    unicode copy.  https://github.com/simplejson/simplejson/pull/210
+
+-------------------------------------------------------------------

Old:
----
  simplejson-3.13.2.tar.gz

New:
----
  simplejson-3.14.0.tar.gz

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

Other differences:
------------------
++++++ python-simplejson.spec ++++++
--- /var/tmp/diff_new_pack.JSaCia/_old  2018-05-11 11:26:15.408794289 +0200
+++ /var/tmp/diff_new_pack.JSaCia/_new  2018-05-11 11:26:15.412794142 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-simplejson
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 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
@@ -18,17 +18,16 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-simplejson
-Version:        3.13.2
+Version:        3.14.0
 Release:        0
 Summary:        Extensible JSON encoder/decoder for Python
-License:        MIT or AFL-2.1
+License:        MIT OR AFL-2.1
 Group:          Development/Languages/Python
-Url:            http://github.com/simplejson/simplejson
+URL:            http://github.com/simplejson/simplejson
 Source:         
https://files.pythonhosted.org/packages/source/s/simplejson/simplejson-%{version}.tar.gz
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  python-rpm-macros
-
 %python_subpackages
 
 %description
@@ -58,13 +57,12 @@
 %python_exec setup.py test
 
 %files  %{python_files}
-%defattr(-,root,root)
-%doc CHANGES.txt LICENSE.txt README.rst
+%license LICENSE.txt
+%doc CHANGES.txt README.rst
 %exclude %{python_sitearch}/simplejson/tests/*
 %{python_sitearch}/*
 
 %files %{python_files test}
-%defattr(-,root,root)
 %{python_sitearch}/simplejson/tests/*
 
 %changelog

++++++ simplejson-3.13.2.tar.gz -> simplejson-3.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simplejson-3.13.2/CHANGES.txt 
new/simplejson-3.14.0/CHANGES.txt
--- old/simplejson-3.13.2/CHANGES.txt   2017-11-24 18:47:05.000000000 +0100
+++ new/simplejson-3.14.0/CHANGES.txt   2018-04-22 00:57:00.000000000 +0200
@@ -1,3 +1,12 @@
+Version 3.14.0 released 2018-04-21
+
+* Defer is_raw_json test (performance improvement)
+  https://github.com/simplejson/simplejson/pull/212
+* Avoid escaping U+2028 and U+2029 without ensure_ascii
+  https://github.com/simplejson/simplejson/pull/211
+* Fix an incorrect type test in Python 2, avoiding an unnecessary unicode copy.
+  https://github.com/simplejson/simplejson/pull/210
+
 Version 3.13.2 released 2017-11-24
 
 * Fix additional Python 2.x compilation issue on Windows
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simplejson-3.13.2/PKG-INFO 
new/simplejson-3.14.0/PKG-INFO
--- old/simplejson-3.13.2/PKG-INFO      2017-11-24 18:47:30.000000000 +0100
+++ new/simplejson-3.14.0/PKG-INFO      2018-04-22 00:57:23.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: simplejson
-Version: 3.13.2
+Version: 3.14.0
 Summary: Simple, fast, extensible JSON encoder/decoder for Python
 Home-page: http://github.com/simplejson/simplejson
 Author: Bob Ippolito
@@ -44,3 +44,20 @@
         .. _python2.2: https://github.com/simplejson/simplejson/tree/python2.2
         
 Platform: any
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: License :: OSI Approved :: MIT License
+Classifier: License :: OSI Approved :: Academic Free License (AFL)
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.5
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simplejson-3.13.2/conf.py 
new/simplejson-3.14.0/conf.py
--- old/simplejson-3.13.2/conf.py       2017-11-24 18:47:05.000000000 +0100
+++ new/simplejson-3.14.0/conf.py       2018-04-22 00:57:00.000000000 +0200
@@ -36,15 +36,15 @@
 
 # General substitutions.
 project = 'simplejson'
-copyright = '2017, Bob Ippolito'
+copyright = '2018, 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 = '3.13'
+version = '3.14'
 # The full version, including alpha/beta/rc tags.
-release = '3.13.2'
+release = '3.14.0'
 
 # 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-3.13.2/index.rst 
new/simplejson-3.14.0/index.rst
--- old/simplejson-3.13.2/index.rst     2017-11-24 18:47:05.000000000 +0100
+++ new/simplejson-3.14.0/index.rst     2018-04-22 00:57:00.000000000 +0200
@@ -767,6 +767,11 @@
 
    Subclass of :class:`JSONEncoder` that escapes &, <, and > for embedding in 
HTML.
 
+   It also escapes the characters U+2028 (LINE SEPARATOR) and
+   U+2029 (PARAGRAPH SEPARATOR), irrespective of the *ensure_ascii* setting,
+   as these characters are not valid in JavaScript strings (see
+   http://timelessrepo.com/json-isnt-a-javascript-subset).
+
    .. versionchanged:: 2.1.0
       New in 2.1.0
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simplejson-3.13.2/setup.py 
new/simplejson-3.14.0/setup.py
--- old/simplejson-3.13.2/setup.py      2017-11-24 18:47:05.000000000 +0100
+++ new/simplejson-3.14.0/setup.py      2018-04-22 00:57:00.000000000 +0200
@@ -12,32 +12,31 @@
     DistutilsPlatformError
 
 IS_PYPY = hasattr(sys, 'pypy_translation_info')
-VERSION = '3.13.2'
+VERSION = '3.14.0'
 DESCRIPTION = "Simple, fast, extensible JSON encoder/decoder for Python"
 
 with open('README.rst', 'r') as f:
    LONG_DESCRIPTION = f.read()
 
-CLASSIFIERS = filter(None, map(str.strip,
-"""
-Development Status :: 5 - Production/Stable
-Intended Audience :: Developers
-License :: OSI Approved :: MIT License
-License :: OSI Approved :: Academic Free License (AFL)
-Programming Language :: Python
-Programming Language :: Python :: 2
-Programming Language :: Python :: 2.5
-Programming Language :: Python :: 2.6
-Programming Language :: Python :: 2.7
-Programming Language :: Python :: 3
-Programming Language :: Python :: 3.3
-Programming Language :: Python :: 3.4
-Programming Language :: Python :: 3.5
-Programming Language :: Python :: 3.6
-Programming Language :: Python :: Implementation :: CPython
-Programming Language :: Python :: Implementation :: PyPy
-Topic :: Software Development :: Libraries :: Python Modules
-""".splitlines()))
+CLASSIFIERS = [
+    'Development Status :: 5 - Production/Stable',
+    'Intended Audience :: Developers',
+    'License :: OSI Approved :: MIT License',
+    'License :: OSI Approved :: Academic Free License (AFL)',
+    'Programming Language :: Python',
+    'Programming Language :: Python :: 2',
+    'Programming Language :: Python :: 2.5',
+    'Programming Language :: Python :: 2.6',
+    'Programming Language :: Python :: 2.7',
+    'Programming Language :: Python :: 3',
+    'Programming Language :: Python :: 3.3',
+    'Programming Language :: Python :: 3.4',
+    'Programming Language :: Python :: 3.5',
+    'Programming Language :: Python :: 3.6',
+    'Programming Language :: Python :: Implementation :: CPython',
+    'Programming Language :: Python :: Implementation :: PyPy',
+    'Topic :: Software Development :: Libraries :: Python Modules',
+]
 
 if sys.platform == 'win32' and sys.version_info < (2, 7):
    # 2.6's distutils.msvc9compiler can raise an IOError when failing to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simplejson-3.13.2/simplejson/__init__.py 
new/simplejson-3.14.0/simplejson/__init__.py
--- old/simplejson-3.13.2/simplejson/__init__.py        2017-11-24 
18:47:05.000000000 +0100
+++ new/simplejson-3.14.0/simplejson/__init__.py        2018-04-22 
00:57:00.000000000 +0200
@@ -98,7 +98,7 @@
     Expecting property name: line 1 column 3 (char 2)
 """
 from __future__ import absolute_import
-__version__ = '3.13.2'
+__version__ = '3.14.0'
 __all__ = [
     'dump', 'dumps', 'load', 'loads',
     'JSONDecoder', 'JSONDecodeError', 'JSONEncoder',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simplejson-3.13.2/simplejson/_speedups.c 
new/simplejson-3.14.0/simplejson/_speedups.c
--- old/simplejson-3.13.2/simplejson/_speedups.c        2017-11-24 
18:47:05.000000000 +0100
+++ new/simplejson-3.14.0/simplejson/_speedups.c        2018-04-22 
00:57:00.000000000 +0200
@@ -2860,12 +2860,6 @@
             if (encoded != NULL)
                 rv = _steal_accumulate(rval, encoded);
         }
-        else if (is_raw_json(obj))
-        {
-            PyObject *encoded = PyObject_GetAttrString(obj, "encoded_json");
-            if (encoded != NULL)
-                rv = _steal_accumulate(rval, encoded);
-        }
         else if (PyInt_Check(obj) || PyLong_Check(obj)) {
             PyObject *encoded;
             if (PyInt_CheckExact(obj) || PyLong_CheckExact(obj)) {
@@ -2933,6 +2927,12 @@
             if (encoded != NULL)
                 rv = _steal_accumulate(rval, encoded);
         }
+        else if (is_raw_json(obj))
+        {
+            PyObject *encoded = PyObject_GetAttrString(obj, "encoded_json");
+            if (encoded != NULL)
+                rv = _steal_accumulate(rval, encoded);
+        }
         else {
             PyObject *ident = NULL;
             PyObject *newobj;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simplejson-3.13.2/simplejson/encoder.py 
new/simplejson-3.14.0/simplejson/encoder.py
--- old/simplejson-3.13.2/simplejson/encoder.py 2017-11-24 18:47:05.000000000 
+0100
+++ new/simplejson-3.14.0/simplejson/encoder.py 2018-04-22 00:57:00.000000000 
+0200
@@ -17,10 +17,7 @@
 from .decoder import PosInf
 from .raw_json import RawJSON
 
-#ESCAPE = re.compile(ur'[\x00-\x1f\\"\b\f\n\r\t\u2028\u2029]')
-# This is required because u() will mangle the string and ur'' isn't valid
-# python3 syntax
-ESCAPE = re.compile(u'[\\x00-\\x1f\\\\"\\b\\f\\n\\r\\t\u2028\u2029]')
+ESCAPE = re.compile(r'[\x00-\x1f\\"]')
 ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')
 HAS_UTF8 = re.compile(r'[\x80-\xff]')
 ESCAPE_DCT = {
@@ -35,8 +32,6 @@
 for i in range(0x20):
     #ESCAPE_DCT.setdefault(chr(i), '\\u{0:04x}'.format(i))
     ESCAPE_DCT.setdefault(chr(i), '\\u%04x' % (i,))
-for i in [0x2028, 0x2029]:
-    ESCAPE_DCT.setdefault(unichr(i), '\\u%04x' % (i,))
 
 FLOAT_REPR = repr
 
@@ -52,7 +47,7 @@
     else:
         if isinstance(s, str) and HAS_UTF8.search(s) is not None:
             s = s.decode('utf-8')
-        if type(s) not in string_types:
+        if type(s) not in (str, unicode):
             if isinstance(s, str):
                 s = str.__str__(s)
             else:
@@ -74,7 +69,7 @@
     else:
         if isinstance(s, str) and HAS_UTF8.search(s) is not None:
             s = s.decode('utf-8')
-        if type(s) not in string_types:
+        if type(s) not in (str, unicode):
             if isinstance(s, str):
                 s = str.__str__(s)
             else:
@@ -382,6 +377,11 @@
     characters &, < and > should be escaped. They cannot be escaped
     with the usual entities (e.g. &amp;) because they are not expanded
     within <script> tags.
+
+    This class also escapes the line separator and paragraph separator
+    characters U+2028 and U+2029, irrespective of the ensure_ascii setting,
+    as these characters are not valid in JavaScript strings (see
+    http://timelessrepo.com/json-isnt-a-javascript-subset).
     """
 
     def encode(self, o):
@@ -399,6 +399,11 @@
             chunk = chunk.replace('&', '\\u0026')
             chunk = chunk.replace('<', '\\u003c')
             chunk = chunk.replace('>', '\\u003e')
+
+            if not self.ensure_ascii:
+                chunk = chunk.replace(u'\u2028', '\\u2028')
+                chunk = chunk.replace(u'\u2029', '\\u2029')
+
             yield chunk
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/simplejson-3.13.2/simplejson/tests/test_encode_for_html.py 
new/simplejson-3.14.0/simplejson/tests/test_encode_for_html.py
--- old/simplejson-3.13.2/simplejson/tests/test_encode_for_html.py      
2017-11-24 18:47:05.000000000 +0100
+++ new/simplejson-3.14.0/simplejson/tests/test_encode_for_html.py      
2018-04-22 00:57:00.000000000 +0200
@@ -7,11 +7,19 @@
     def setUp(self):
         self.decoder = json.JSONDecoder()
         self.encoder = json.JSONEncoderForHTML()
+        self.non_ascii_encoder = json.JSONEncoderForHTML(ensure_ascii=False)
 
     def test_basic_encode(self):
         self.assertEqual(r'"\u0026"', self.encoder.encode('&'))
         self.assertEqual(r'"\u003c"', self.encoder.encode('<'))
         self.assertEqual(r'"\u003e"', self.encoder.encode('>'))
+        self.assertEqual(r'"\u2028"', self.encoder.encode(u'\u2028'))
+
+    def test_non_ascii_basic_encode(self):
+        self.assertEqual(r'"\u0026"', self.non_ascii_encoder.encode('&'))
+        self.assertEqual(r'"\u003c"', self.non_ascii_encoder.encode('<'))
+        self.assertEqual(r'"\u003e"', self.non_ascii_encoder.encode('>'))
+        self.assertEqual(r'"\u2028"', self.non_ascii_encoder.encode(u'\u2028'))
 
     def test_basic_roundtrip(self):
         for char in '&<>':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/simplejson-3.13.2/simplejson/tests/test_str_subclass.py 
new/simplejson-3.14.0/simplejson/tests/test_str_subclass.py
--- old/simplejson-3.13.2/simplejson/tests/test_str_subclass.py 2017-11-24 
18:47:05.000000000 +0100
+++ new/simplejson-3.14.0/simplejson/tests/test_str_subclass.py 2018-04-22 
00:57:00.000000000 +0200
@@ -14,3 +14,8 @@
             self.assertEqual(
                 s,
                 simplejson.loads(simplejson.dumps(WonkyTextSubclass(s))))
+
+            self.assertEqual(
+                s,
+                simplejson.loads(simplejson.dumps(WonkyTextSubclass(s),
+                                                  ensure_ascii=False)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simplejson-3.13.2/simplejson/tests/test_unicode.py 
new/simplejson-3.14.0/simplejson/tests/test_unicode.py
--- old/simplejson-3.13.2/simplejson/tests/test_unicode.py      2017-11-24 
18:47:05.000000000 +0100
+++ new/simplejson-3.14.0/simplejson/tests/test_unicode.py      2018-04-22 
00:57:00.000000000 +0200
@@ -106,10 +106,11 @@
         s1 = u'\u2029\u2028'
         s2 = s1.encode('utf8')
         expect = '"\\u2029\\u2028"'
+        expect_non_ascii = u'"\u2029\u2028"'
         self.assertEqual(json.dumps(s1), expect)
         self.assertEqual(json.dumps(s2), expect)
-        self.assertEqual(json.dumps(s1, ensure_ascii=False), expect)
-        self.assertEqual(json.dumps(s2, ensure_ascii=False), expect)
+        self.assertEqual(json.dumps(s1, ensure_ascii=False), expect_non_ascii)
+        self.assertEqual(json.dumps(s2, ensure_ascii=False), expect_non_ascii)
 
     def test_invalid_escape_sequences(self):
         # incomplete escape sequence
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/simplejson-3.13.2/simplejson.egg-info/PKG-INFO 
new/simplejson-3.14.0/simplejson.egg-info/PKG-INFO
--- old/simplejson-3.13.2/simplejson.egg-info/PKG-INFO  2017-11-24 
18:47:30.000000000 +0100
+++ new/simplejson-3.14.0/simplejson.egg-info/PKG-INFO  2018-04-22 
00:57:23.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: simplejson
-Version: 3.13.2
+Version: 3.14.0
 Summary: Simple, fast, extensible JSON encoder/decoder for Python
 Home-page: http://github.com/simplejson/simplejson
 Author: Bob Ippolito


Reply via email to