File tree Expand file tree Collapse file tree 7 files changed +36
-8
lines changed
Expand file tree Collapse file tree 7 files changed +36
-8
lines changed Original file line number Diff line number Diff line change 1515
1616
1717"""
18- import json
18+ import sys
1919import six
2020
21+ if sys .version [:3 ] == '2.6' :
22+ import simplejson as json
23+ else :
24+ import json
25+
2126## Base Plotly Error ##
2227
2328class PlotlyError (Exception ):
Original file line number Diff line number Diff line change 55"""
66from __future__ import absolute_import
77
8-
9- import json
8+ import sys
109from collections import MutableSequence
1110from plotly import exceptions
1211from plotly import utils
1312
13+ if sys .version [:3 ] == '2.6' :
14+ import simplejson as json
15+ else :
16+ import json
17+
1418__all__ = None
1519
1620
Original file line number Diff line number Diff line change 1717from __future__ import absolute_import
1818
1919import sys
20- import json
2120import warnings
2221import copy
2322import os
3029else :
3130 from urllib .parse import urlparse
3231
32+ if sys .version [:3 ] == '2.6' :
33+ import simplejson as json
34+ else :
35+ import json
36+
3337from plotly .plotly import chunked_requests
3438from plotly import utils
3539from plotly import tools
Original file line number Diff line number Diff line change 1010from plotly import exceptions
1111from nose .tools import raises
1212import six
13- import json
1413
1514from unittest import TestCase
1615
Original file line number Diff line number Diff line change 88
99import requests
1010import copy
11- import json
1211import six
12+ import sys
13+
14+ if sys .version [:3 ] == '2.6' :
15+ import simplejson as json
16+ else :
17+ import json
1318
1419default_headers = {'plotly-username' : '' ,
1520 'plotly-apikey' : '' ,
Original file line number Diff line number Diff line change 1- import json
1+ import sys
22from unittest import TestCase
33
44from plotly .utils import PlotlyJSONEncoder
55
6+ if sys .version [:3 ] == '2.6' :
7+ import simplejson as json
8+ else :
9+ import json
10+
611
712class TestJSONEncoder (TestCase ):
813
Original file line number Diff line number Diff line change 11from collections import deque
2- import json
32import uuid
3+ import sys
44
55# TODO: protected imports?
66from IPython .html import widgets
1111from plotly .graph_objs import Figure
1212from pkg_resources import resource_string
1313
14+ # even though python 2.6 wouldn't be able to run *any* of this...
15+ if sys .version [:3 ] == '2.6' :
16+ import simplejson as json
17+ else :
18+ import json
19+
1420# Load JS widget code
1521# No officially recommended way to do this in any other way
1622# http://mail.scipy.org/pipermail/ipython-dev/2014-April/013835.html
You can’t perform that action at this time.
0 commit comments