Synced jsonutils from oslo-incubator
The sync includes change that drastically enhances performance on Python 2.6 with fresh simplejson library installed. The latest commit in oslo-incubator: - 732bdb6297eb9de81667f7713ebcb1ccc2ee45a7 Change-Id: Ib3dc0b713ed90396919feba018772243b3b9c90f Closes-Bug: 1314129
This commit is contained in:
parent
0a7744fd6a
commit
e69fed6e27
@ -35,18 +35,20 @@ import datetime
|
|||||||
import functools
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
import itertools
|
import itertools
|
||||||
import json
|
import sys
|
||||||
try:
|
|
||||||
import xmlrpclib
|
if sys.version_info < (2, 7):
|
||||||
except ImportError:
|
# On Python <= 2.6, json module is not C boosted, so try to use
|
||||||
# NOTE(jaypipes): xmlrpclib was renamed to xmlrpc.client in Python3
|
# simplejson module if available
|
||||||
# however the function and object call signatures
|
try:
|
||||||
# remained the same. This whole try/except block should
|
import simplejson as json
|
||||||
# be removed and replaced with a call to six.moves once
|
except ImportError:
|
||||||
# six 1.4.2 is released. See http://bit.ly/1bqrVzu
|
import json
|
||||||
import xmlrpc.client as xmlrpclib
|
else:
|
||||||
|
import json
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
import six.moves.xmlrpc_client as xmlrpclib
|
||||||
|
|
||||||
from neutron.openstack.common import gettextutils
|
from neutron.openstack.common import gettextutils
|
||||||
from neutron.openstack.common import importutils
|
from neutron.openstack.common import importutils
|
||||||
|
Loading…
x
Reference in New Issue
Block a user