Reviewers: ,
Please review this at http://codereview.tryton.org/146001/ Affected files: M doc/topics/install.rst M setup.py M trytond/protocols/jsonrpc.py M trytond/pyson.py Index: doc/topics/install.rst =================================================================== --- a/doc/topics/install.rst +++ b/doc/topics/install.rst @@ -20,6 +20,7 @@ * Optional: pytz (http://pytz.sourceforge.net/) * Optional: unoconv http://dag.wieers.com/home-made/unoconv/) * Optional: sphinx (http://sphinx.pocoo.org/) + * Optional: simplejson (http://undefined.org/python/#simplejson) Install Tryton ============== Index: setup.py =================================================================== --- a/setup.py +++ b/setup.py @@ -69,6 +69,7 @@ 'SSL': ['pyOpenSSL'], 'graphviz': ['pydot'], 'timezone': ['pytz'], + 'simplejson': ['simplejson'], }, zip_safe=False, test_suite='trytond.tests', Index: trytond/protocols/jsonrpc.py =================================================================== --- a/trytond/protocols/jsonrpc.py +++ b/trytond/protocols/jsonrpc.py @@ -22,7 +22,10 @@ import urllib import datetime from decimal import Decimal -import json +try: + import simplejson as json +except ImportError: + import json import base64 def object_hook(dct): Index: trytond/pyson.py =================================================================== --- a/trytond/pyson.py +++ b/trytond/pyson.py @@ -1,7 +1,10 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import sys -import json +try: + import simplejson as json +except ImportError: + import json import datetime from functools import reduce -- [email protected] mailing list
