Skip to content

Commit 1249d4c

Browse files
committed
python 3 renames the urlparse module.
1 parent 5d86ef4 commit 1249d4c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plotly/plotly/plotly.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,19 @@
1616
"""
1717
from __future__ import absolute_import
1818

19+
import sys
1920
import json
2021
import warnings
2122
import copy
2223
import os
2324
import six
2425
import base64
2526
import requests
26-
from urlparse import urlparse
27+
28+
if sys.version[:1] == '2':
29+
from urlparse import urlparse
30+
else:
31+
from urllib.parse import urlparse
2732

2833
from plotly.plotly import chunked_requests
2934
from plotly import utils

0 commit comments

Comments
 (0)