web/__init__.py
changeset 5940 0e3ae19b181a
parent 5713 605f571198eb
child 6106 1e6d93f70d14
--- a/web/__init__.py	Thu Jul 08 12:54:28 2010 +0200
+++ b/web/__init__.py	Thu Jul 08 13:33:40 2010 +0200
@@ -22,20 +22,14 @@
 __docformat__ = "restructuredtext en"
 _ = unicode
 
-import sys
-if sys.version_info < (2,6):
-    import simplejson as json
-else:
-    import json
-
-dumps = json.dumps
-
 from urllib import quote as urlquote
 
 from logilab.common.deprecation import deprecated
 
 from cubicweb.web._exceptions import *
-from cubicweb.utils import CubicWebJsonEncoder
+from cubicweb.utils import json_dumps
+
+dumps = deprecated('[3.9] use cubicweb.utils.json_dumps instead of dumps')(json_dumps)
 
 INTERNAL_FIELD_VALUE = '__cubicweb_internal_field__'
 
@@ -64,9 +58,6 @@
 FACETTES = set()
 
 
-def json_dumps(value):
-    return dumps(value, cls=CubicWebJsonEncoder)
-
 def jsonize(function):
     def newfunc(*args, **kwargs):
         value = function(*args, **kwargs)