|
|
c5093d |
--- anyjson-0.3.3/anyjson/__init__.py 2017-02-10 14:40:44.238386339 -0800
|
|
|
c5093d |
+++ anyjson-0.3.3/anyjson/__init__.py.new 2017-02-10 14:40:46.551395839 -0800
|
|
|
c5093d |
@@ -31,13 +31,11 @@
|
|
|
c5093d |
#: List of known json modules, and the names of their loads/dumps
|
|
|
c5093d |
#: methods, as well as the exceptions they throw. Exception can be either
|
|
|
c5093d |
#: an exception class or a string.
|
|
|
c5093d |
-_modules = [("yajl", "dumps", TypeError, "loads", ValueError, "load"),
|
|
|
c5093d |
- ("jsonlib2", "write", "WriteError", "read", "ReadError", None),
|
|
|
c5093d |
- ("jsonlib", "write", "WriteError", "read", "ReadError", None),
|
|
|
c5093d |
+_modules = [("ujson", "dumps", TypeError, "loads", ValueError, None),
|
|
|
c5093d |
+ ("yajl", "dumps", TypeError, "loads", ValueError, "load"),
|
|
|
c5093d |
+ ("cjson", "encode", "EncodeError", "decode", "DecodeError", None),
|
|
|
c5093d |
("simplejson", "dumps", TypeError, "loads", ValueError, "load"),
|
|
|
c5093d |
("json", "dumps", TypeError, "loads", ValueError, "load"),
|
|
|
c5093d |
- ("django.utils.simplejson", "dumps", TypeError, "loads", ValueError, "load"),
|
|
|
c5093d |
- ("cjson", "encode", "EncodeError", "decode", "DecodeError", None)
|
|
|
c5093d |
]
|
|
|
c5093d |
|
|
|
c5093d |
_fields = ("modname", "encoder", "encerror",
|
|
|
c5093d |
@@ -50,10 +48,6 @@
|
|
|
c5093d |
def __init__(self, modspec):
|
|
|
c5093d |
modinfo = dict(zip(_fields, modspec))
|
|
|
c5093d |
|
|
|
c5093d |
- if modinfo["modname"] == "cjson":
|
|
|
c5093d |
- import warnings
|
|
|
c5093d |
- warnings.warn("cjson is deprecated! See http://pypi.python.org/pypi/python-cjson/1.0.5", DeprecationWarning)
|
|
|
c5093d |
-
|
|
|
c5093d |
# No try block. We want importerror to end up at caller
|
|
|
c5093d |
module = self._attempt_load(modinfo["modname"])
|
|
|
c5093d |
|