File tree Expand file tree Collapse file tree 7 files changed +8
-48
lines changed Expand file tree Collapse file tree 7 files changed +8
-48
lines changed Original file line number Diff line number Diff line change 15
15
16
16
17
17
"""
18
- import sys
19
- import six
20
-
21
- if sys .version [:3 ] == '2.6' :
22
- import simplejson as json
23
- else :
24
- import json
18
+ import json
25
19
26
20
## Base Plotly Error ##
27
21
Original file line number Diff line number Diff line change 25
25
from __future__ import absolute_import
26
26
27
27
import warnings
28
+ from collections import OrderedDict
28
29
import six
29
30
from plotly .graph_objs import graph_objs_tools
30
31
from plotly .graph_objs .graph_objs_tools import (
35
36
from plotly import utils
36
37
37
38
import copy
38
- import sys
39
- if sys .version [:3 ] == '2.6' :
40
- from ordereddict import OrderedDict
41
- else :
42
- from collections import OrderedDict
43
-
44
39
__all__ = None
45
40
46
41
Original file line number Diff line number Diff line change 1
1
from __future__ import absolute_import
2
2
from plotly import utils
3
3
import textwrap
4
+ import json
4
5
import os
5
- import sys
6
- if sys .version [:3 ] == '2.6' :
7
- try :
8
- from ordereddict import OrderedDict
9
- import simplejson as json
10
- except ImportError :
11
- raise ImportError (
12
- "Looks like you're running Python 2.6. Plotly expects newer "
13
- "standard library versions of ordereddict and json. You can "
14
- "simply upgrade with these 'extras' with the following terminal "
15
- "command:\n pip install 'plotly[PY2.6]'"
16
- )
17
- else :
18
- from collections import OrderedDict
19
- import json
6
+ from collections import OrderedDict
20
7
import six
21
8
22
9
from pkg_resources import resource_string
Original file line number Diff line number Diff line change 5
5
"""
6
6
from __future__ import absolute_import
7
7
8
- import sys
8
+ import json
9
9
from collections import MutableSequence
10
10
from plotly import exceptions
11
11
from plotly import utils
12
12
13
- if sys .version [:3 ] == '2.6' :
14
- import simplejson as json
15
- else :
16
- import json
17
13
18
14
__all__ = None
19
15
Original file line number Diff line number Diff line change 19
19
import sys
20
20
import warnings
21
21
import copy
22
+ import json
22
23
import os
23
24
import six
24
25
import base64
29
30
else :
30
31
from urllib .parse import urlparse
31
32
32
- if sys .version [:3 ] == '2.6' :
33
- import simplejson as json
34
- else :
35
- import json
36
33
37
34
from plotly .plotly import chunked_requests
38
35
from plotly import utils
Original file line number Diff line number Diff line change 6
6
7
7
"""
8
8
9
+ import json
9
10
import os .path
10
11
import sys
11
12
import threading
31
32
except ImportError :
32
33
_sage_imported = False
33
34
34
- if sys .version [:3 ] == '2.6' :
35
- import simplejson as json
36
- else :
37
- import json
38
-
39
35
40
36
### incase people are using threading, we lock file reads
41
37
lock = threading .Lock ()
Original file line number Diff line number Diff line change 1
1
from collections import deque
2
+ import json
2
3
import uuid
3
- import sys
4
4
5
5
# TODO: protected imports?
6
6
from IPython .html import widgets
12
12
from plotly .graph_objs import Figure
13
13
from pkg_resources import resource_string
14
14
15
- # even though python 2.6 wouldn't be able to run *any* of this...
16
- if sys .version [:3 ] == '2.6' :
17
- import simplejson as json
18
- else :
19
- import json
20
15
21
16
# Load JS widget code
22
17
# No officially recommended way to do this in any other way
You can’t perform that action at this time.
0 commit comments