diff --git a/CHANGES.txt b/CHANGES.txt index f22c02e562846ff23d9b4654ea90d94775b6c905_Q0hBTkdFUy50eHQ=..ff714ca2bc6e7614faf4498aca2eae5ee5086a82_Q0hBTkdFUy50eHQ= 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +Version 3.0.2 released 2013-01-01 + +* Missed a changeset to _speedups.c in the 3.0.1 branch cut, please + DO NOT install 3.0.1! + Version 3.0.1 released 2013-01-01 * Add accumulator optimization to encoder, equivalent to the usage of diff --git a/conf.py b/conf.py index f22c02e562846ff23d9b4654ea90d94775b6c905_Y29uZi5weQ==..ff714ca2bc6e7614faf4498aca2eae5ee5086a82_Y29uZi5weQ== 100644 --- a/conf.py +++ b/conf.py @@ -44,7 +44,7 @@ # The short X.Y version. version = '3.0' # The full version, including alpha/beta/rc tags. -release = '3.0.1' +release = '3.0.2' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff --git a/setup.py b/setup.py index f22c02e562846ff23d9b4654ea90d94775b6c905_c2V0dXAucHk=..ff714ca2bc6e7614faf4498aca2eae5ee5086a82_c2V0dXAucHk= 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ DistutilsPlatformError IS_PYPY = hasattr(sys, 'pypy_translation_info') -VERSION = '3.0.1' +VERSION = '3.0.2' DESCRIPTION = "Simple, fast, extensible JSON encoder/decoder for Python" LONG_DESCRIPTION = open('README.rst', 'r').read() diff --git a/simplejson/__init__.py b/simplejson/__init__.py index f22c02e562846ff23d9b4654ea90d94775b6c905_c2ltcGxlanNvbi9fX2luaXRfXy5weQ==..ff714ca2bc6e7614faf4498aca2eae5ee5086a82_c2ltcGxlanNvbi9fX2luaXRfXy5weQ== 100644 --- a/simplejson/__init__.py +++ b/simplejson/__init__.py @@ -99,7 +99,7 @@ Expecting property name: line 1 column 2 (char 2) """ from __future__ import absolute_import -__version__ = '3.0.1' +__version__ = '3.0.2' __all__ = [ 'dump', 'dumps', 'load', 'loads', 'JSONDecoder', 'JSONDecodeError', 'JSONEncoder', diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c index f22c02e562846ff23d9b4654ea90d94775b6c905_c2ltcGxlanNvbi9fc3BlZWR1cHMuYw==..ff714ca2bc6e7614faf4498aca2eae5ee5086a82_c2ltcGxlanNvbi9fc3BlZWR1cHMuYw== 100644 --- a/simplejson/_speedups.c +++ b/simplejson/_speedups.c @@ -2312,7 +2312,6 @@ /* Didn't find a string, object, array, or named constant. Look for a number. */ if (fallthrough) rval = _match_number_unicode(s, pystr, idx, next_idx_ptr); - Py_LeaveRecursiveCall(); return rval; } @@ -2717,8 +2716,6 @@ { /* Encode Python object obj to a JSON term, rval is a PyList */ int rv = -1; - if (Py_EnterRecursiveCall(" while encoding a JSON document")) - return rv; do { if (obj == Py_None || obj == Py_True || obj == Py_False) { PyObject *cstr = _encoded_const(obj); @@ -2748,8 +2745,10 @@ rv = _steal_accumulate(rval, encoded); } else if (s->namedtuple_as_object && _is_namedtuple(obj)) { + if (Py_EnterRecursiveCall(" while encoding a JSON object")) + return rv; PyObject *newobj = PyObject_CallMethod(obj, "_asdict", NULL); if (newobj != NULL) { rv = encoder_listencode_dict(s, rval, newobj, indent_level); Py_DECREF(newobj); } @@ -2751,7 +2750,8 @@ PyObject *newobj = PyObject_CallMethod(obj, "_asdict", NULL); if (newobj != NULL) { rv = encoder_listencode_dict(s, rval, newobj, indent_level); Py_DECREF(newobj); } + Py_LeaveRecursiveCall(); } else if (PyList_Check(obj) || (s->tuple_as_array && PyTuple_Check(obj))) { @@ -2756,3 +2756,5 @@ } else if (PyList_Check(obj) || (s->tuple_as_array && PyTuple_Check(obj))) { + if (Py_EnterRecursiveCall(" while encoding a JSON object")) + return rv; rv = encoder_listencode_list(s, rval, obj, indent_level); @@ -2758,3 +2760,4 @@ rv = encoder_listencode_list(s, rval, obj, indent_level); + Py_LeaveRecursiveCall(); } else if (PyDict_Check(obj)) { @@ -2759,3 +2762,5 @@ } else if (PyDict_Check(obj)) { + if (Py_EnterRecursiveCall(" while encoding a JSON object")) + return rv; rv = encoder_listencode_dict(s, rval, obj, indent_level); @@ -2761,4 +2766,5 @@ rv = encoder_listencode_dict(s, rval, obj, indent_level); + Py_LeaveRecursiveCall(); } else if (s->use_decimal && PyObject_TypeCheck(obj, (PyTypeObject *)s->Decimal)) { PyObject *encoded = PyObject_Str(obj); @@ -2785,9 +2791,11 @@ break; } } + if (Py_EnterRecursiveCall(" while encoding a JSON object")) + return rv; newobj = PyObject_CallFunctionObjArgs(s->defaultfn, obj, NULL); if (newobj == NULL) { Py_XDECREF(ident); break; } rv = encoder_listencode_obj(s, rval, newobj, indent_level); @@ -2788,9 +2796,10 @@ newobj = PyObject_CallFunctionObjArgs(s->defaultfn, obj, NULL); if (newobj == NULL) { Py_XDECREF(ident); break; } rv = encoder_listencode_obj(s, rval, newobj, indent_level); + Py_LeaveRecursiveCall(); Py_DECREF(newobj); if (rv) { Py_XDECREF(ident); @@ -2805,7 +2814,6 @@ } } } while (0); - Py_LeaveRecursiveCall(); return rv; }