File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
tests/test_core/test_graph_reference Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 66
77import os
88import re
9- from pkg_resources import resource_string
9+ import pkgutil
1010
1111import six
1212from requests .compat import json as _json
@@ -69,7 +69,7 @@ def get_graph_reference():
6969
7070 """
7171 path = os .path .join ('package_data' , 'plot-schema.json' )
72- s = resource_string ('plotly' , path ).decode ('utf-8' )
72+ s = pkgutil . get_data ('plotly' , path ).decode ('utf-8' )
7373 graph_reference = utils .decode_unicode (_json .loads (s ))
7474
7575 # TODO: Patch in frames info until it hits streambed. See #659
Original file line number Diff line number Diff line change 88import os
99import uuid
1010import warnings
11- from pkg_resources import resource_string
11+ import pkgutil
1212import time
1313import webbrowser
1414
@@ -38,7 +38,7 @@ def download_plotlyjs(download_url):
3838
3939def get_plotlyjs ():
4040 path = os .path .join ('package_data' , 'plotly.min.js' )
41- plotlyjs = resource_string ('plotly' , path ).decode ('utf-8' )
41+ plotlyjs = pkgutil . get_data ('plotly' , path ).decode ('utf-8' )
4242 return plotlyjs
4343
4444def get_image_download_script (caller ):
Original file line number Diff line number Diff line change 55from __future__ import absolute_import
66
77import os
8- from pkg_resources import resource_string
98from unittest import TestCase
109
1110from nose .plugins .attrib import attr
Original file line number Diff line number Diff line change 44"""
55import uuid
66from collections import deque
7- from pkg_resources import resource_string
7+ import pkgutil
88
99from requests .compat import json as _json
1010
2020# Load JS widget code
2121# No officially recommended way to do this in any other way
2222# http://mail.scipy.org/pipermail/ipython-dev/2014-April/013835.html
23- js_widget_code = resource_string ('plotly' ,
24- 'package_data/graphWidget.js' ).decode ('utf-8' )
23+ js_widget_code = pkgutil .get_data ('plotly' ,
24+ 'package_data/graphWidget.js'
25+ ).decode ('utf-8' )
2526
2627display (Javascript (js_widget_code ))
2728
You can’t perform that action at this time.
0 commit comments