Skip to content

Commit a283d83

Browse files
committed
Merge pull request #182 from plotly/faster-images
4x iplot load-time performance
2 parents cbb2ee2 + 32bfe98 commit a283d83

File tree

3 files changed

+3
-33
lines changed

3 files changed

+3
-33
lines changed

plotly/tests/test_optional/test_ipython/test_embed.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
import threading
66
import six
77
import unittest
8+
from unittest import skip
89
version = six.sys.version_info[:2] # need this for conditional testing
910

1011
# unittest `skipIf` not supported in 2.6 and IPython not supported in 2.6/3.2
1112
if version < (2, 7) or (2, 7) < version < (3, 3):
1213
pass
1314
else:
14-
15+
@skip
1516
class TestPlotlyDisplay(unittest.TestCase):
1617

1718
def setUp(self):

plotly/tools.py

-31
Original file line numberDiff line numberDiff line change
@@ -1230,34 +1230,3 @@ def __init__(self, url, width, height):
12301230

12311231
def _repr_html_(self):
12321232
return self.embed_code
1233-
1234-
def _repr_svg_(self):
1235-
url = self.resource + ".svg"
1236-
res = requests.get(url)
1237-
if six.PY3:
1238-
cont = res.content.decode('utf-8', 'replace')
1239-
else:
1240-
cont = res.content
1241-
return cont
1242-
1243-
def _repr_png_(self):
1244-
url = self.resource + ".png"
1245-
res = requests.get(url)
1246-
cont = res.content
1247-
return cont
1248-
1249-
def _repr_pdf_(self):
1250-
url = self.resource + ".pdf"
1251-
res = requests.get(url)
1252-
cont = res.content
1253-
if six.PY3:
1254-
cont = res.content.decode('utf-8', 'replace')
1255-
else:
1256-
cont = res.content
1257-
return cont
1258-
1259-
def _repr_jpeg_(self):
1260-
url = self.resource + ".jpeg"
1261-
res = requests.get(url)
1262-
cont = res.content
1263-
return cont

plotly/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.6.5'
1+
__version__ = '1.6.6'

0 commit comments

Comments
 (0)