[Buildbot-commits] [SPAM] [Buildbot] #717: Fix json/simplejson handling
Buildbot
buildbot-devel at lists.sourceforge.net
Tue Feb 16 20:23:34 UTC 2010
#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
More information about the Commits
mailing list