diff options
author | Rune Halvorsen <runefh@gmail.com> | 2011-03-22 11:50:41 +0100 |
---|---|---|
committer | Rune Halvorsen <runefh@gmail.com> | 2011-03-22 11:50:41 +0100 |
commit | 16ea1e4ce4f1ff49fbf7f127b8c5fba58ea23eb4 (patch) | |
tree | 208f4cad8c166fb43a133244b75ec2b1c6e10711 | |
parent | 5bfbda82d1ec5afae795eb030a5c280ef1f6bf3b (diff) | |
download | anyjson-16ea1e4ce4f1ff49fbf7f127b8c5fba58ea23eb4.tar.gz |
Added deprecation warning for cjson. Closes #7
-rw-r--r-- | anyjson/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/anyjson/__init__.py b/anyjson/__init__.py index 1878063..c4e7232 100644 --- a/anyjson/__init__.py +++ b/anyjson/__init__.py @@ -53,6 +53,10 @@ class _JsonImplementation(object): def __init__(self, modspec): modinfo = dict(zip(_fields, modspec)) + if modinfo["modname"] == "cjson": + import warnings + warnings.warn("cjson is deprecated! See http://pypi.python.org/pypi/python-cjson/1.0.5", DeprecationWarning) + # No try block. We want importerror to end up at caller module = self._attempt_load(modinfo["modname"]) |