Commit d3fc0e30 authored by Piotr Ożarowski's avatar Piotr Ożarowski

New upstream version 3.16.0

parent 9c880f69
Version 3.16.0 released 2018-06-28
* Restore old behavior with regard to the type of decoded empty
strings with speedups enabled on Python 2.x
https://github.com/simplejson/simplejson/pull/225
* Add python_requires to setup.py to help pip
https://github.com/simplejson/simplejson/pull/224
* Fix CSS in docs when built locally
https://github.com/simplejson/simplejson/pull/222
Version 3.15.0 released 2018-05-12
* Clean up the C code
......
Metadata-Version: 1.1
Metadata-Version: 1.2
Name: simplejson
Version: 3.15.0
Version: 3.16.0
Summary: Simple, fast, extensible JSON encoder/decoder for Python
Home-page: http://github.com/simplejson/simplejson
Home-page: https://github.com/simplejson/simplejson
Author: Bob Ippolito
Author-email: bob@redivi.com
License: MIT License
......@@ -61,3 +61,4 @@ 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
Requires-Python: >=2.5, !=3.0.*, !=3.1.*, !=3.2.*
......@@ -42,9 +42,9 @@ copyright = '2018, Bob Ippolito'
# other places throughout the built documents.
#
# The short X.Y version.
version = '3.15'
version = '3.16'
# The full version, including alpha/beta/rc tags.
release = '3.15.0'
release = '3.16.0'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
......@@ -83,7 +83,7 @@ pygments_style = 'sphinx'
# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
html_style = 'default.css'
#html_style = 'default.css'
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
......
......@@ -12,12 +12,14 @@ from distutils.errors import CCompilerError, DistutilsExecError, \
DistutilsPlatformError
IS_PYPY = hasattr(sys, 'pypy_translation_info')
VERSION = '3.15.0'
VERSION = '3.16.0'
DESCRIPTION = "Simple, fast, extensible JSON encoder/decoder for Python"
with open('README.rst', 'r') as f:
LONG_DESCRIPTION = f.read()
PYTHON_REQUIRES = '>=2.5, !=3.0.*, !=3.1.*, !=3.2.*'
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
......@@ -41,7 +43,7 @@ CLASSIFIERS = [
if sys.platform == 'win32' and sys.version_info < (2, 7):
# 2.6's distutils.msvc9compiler can raise an IOError when failing to
# find the compiler
# It can also raise ValueError http://bugs.python.org/issue7511
# It can also raise ValueError https://bugs.python.org/issue7511
ext_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError,
IOError, ValueError)
else:
......@@ -101,9 +103,10 @@ def run_setup(with_binary):
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
classifiers=CLASSIFIERS,
python_requires=PYTHON_REQUIRES,
author="Bob Ippolito",
author_email="bob@redivi.com",
url="http://github.com/simplejson/simplejson",
url="https://github.com/simplejson/simplejson",
license="MIT License",
packages=['simplejson', 'simplejson.tests'],
platforms=['any'],
......
Metadata-Version: 1.1
Metadata-Version: 1.2
Name: simplejson
Version: 3.15.0
Version: 3.16.0
Summary: Simple, fast, extensible JSON encoder/decoder for Python
Home-page: http://github.com/simplejson/simplejson
Home-page: https://github.com/simplejson/simplejson
Author: Bob Ippolito
Author-email: bob@redivi.com
License: MIT License
......@@ -61,3 +61,4 @@ 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
Requires-Python: >=2.5, !=3.0.*, !=3.1.*, !=3.2.*
......@@ -98,7 +98,7 @@ Using simplejson.tool from the shell to validate and pretty-print::
Expecting property name: line 1 column 3 (char 2)
"""
from __future__ import absolute_import
__version__ = '3.15.0'
__version__ = '3.16.0'
__all__ = [
'dump', 'dumps', 'load', 'loads',
'JSONDecoder', 'JSONDecodeError', 'JSONEncoder',
......
......@@ -76,6 +76,9 @@ static PyObject *JSON_Infinity = NULL;
static PyObject *JSON_NegInfinity = NULL;
static PyObject *JSON_NaN = NULL;
static PyObject *JSON_EmptyUnicode = NULL;
#if PY_MAJOR_VERSION < 3
static PyObject *JSON_EmptyStr = NULL;
#endif
static PyTypeObject PyScannerType;
static PyTypeObject PyEncoderType;
......@@ -785,12 +788,7 @@ join_list_string(PyObject *lst)
/* return ''.join(lst) */
static PyObject *joinfn = NULL;
if (joinfn == NULL) {
PyObject *ustr = PyString_FromStringAndSize(NULL, 0);
if (ustr == NULL)
return NULL;
joinfn = PyObject_GetAttrString(ustr, "join");
Py_DECREF(ustr);
joinfn = PyObject_GetAttrString(JSON_EmptyStr, "join");
if (joinfn == NULL)
return NULL;
}
......@@ -1026,7 +1024,7 @@ scanstring_str(PyObject *pystr, Py_ssize_t end, char *encoding, int strict, Py_s
if (chunk != NULL)
rval = chunk;
else {
rval = JSON_EmptyUnicode;
rval = JSON_EmptyStr;
Py_INCREF(rval);
}
}
......@@ -3331,6 +3329,9 @@ init_constants(void)
#if PY_MAJOR_VERSION >= 3
JSON_EmptyUnicode = PyUnicode_New(0, 127);
#else /* PY_MAJOR_VERSION >= 3 */
JSON_EmptyStr = PyString_FromString("");
if (JSON_EmptyStr == NULL)
return 0;
JSON_EmptyUnicode = PyUnicode_FromUnicode(NULL, 0);
#endif /* PY_MAJOR_VERSION >= 3 */
if (JSON_EmptyUnicode == NULL)
......
......@@ -22,6 +22,8 @@ class TestScanString(TestCase):
return
self._test_scanstring(simplejson.decoder.c_scanstring)
self.assertTrue(isinstance(simplejson.decoder.c_scanstring('""', 0)[0], str))
def _test_scanstring(self, scanstring):
if sys.maxunicode == 65535:
self.assertEqual(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment