#717: Fix json/simplejson handling
-----------------------------------+----------------------------------------
Reporter: dustin | Owner:
Type: defect | Status: new
Priority: blocker | Milestone: 0.8.0
Version: master (give git sha1) | Keywords:
-----------------------------------+----------------------------------------
http://lists.debian.org/debian-python/2010/02/msg00016.html
{{{
Hello everyone,
It seems like python-json should either be renamed of deprecated.
Meanwhile, all the Python application and modules that use JSON should
be careful when importing the json module. Here's how I do it. (see the
code extract below)
# JSON im# JSON import:
try:
import json # python 2.6
except ImportError:
import simplejson as json # python 2.4 to 2.5
try:
_tmp = json.loads
except AttributeError:
import warnings
import sys
warnings.warn("Use simplejson, not the old json module.")
sys.modules.pop('json') # get rid of the bad json module
import simplejson as json
}}}
--
Ticket URL: <http://buildbot.net/trac/ticket/717>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits