Skip to content

Commit 35eaab3

Browse files
committed
Remove legacy requirements
1 parent 31070a2 commit 35eaab3

File tree

4 files changed

+4
-23
lines changed

4 files changed

+4
-23
lines changed

Diff for: packages/python/plotly/plotly/io/_kaleido.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
from __future__ import absolute_import
22
from six import string_types
33
import os
4-
import sys
54
import json
5+
from pathlib import Path, PurePath
66
import plotly
77
from plotly.io._utils import validate_coerce_fig_to_dict
88

9-
if sys.version_info >= (3, 4):
10-
from pathlib import Path, PurePath
11-
else:
12-
# For Python < 3.4 use pathlib2
13-
from pathlib2 import Path, PurePath
14-
159
try:
1610
from kaleido.scopes.plotly import PlotlyScope
1711

Diff for: packages/python/plotly/plotly/tests/test_optional/test_kaleido/test_kaleido.py

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
import plotly.io as pio
22
import plotly.io.kaleido
3-
import sys
43
from contextlib import contextmanager
54
from io import BytesIO
6-
7-
if sys.version_info >= (3, 4):
8-
from pathlib import Path
9-
else:
10-
# For Python < 3.4 use pathlib2
11-
from pathlib2 import Path
12-
13-
if sys.version_info >= (3, 3):
14-
from unittest.mock import Mock
15-
else:
16-
from mock import Mock
5+
from pathlib import Path
6+
from unittest.mock import Mock
177

188
fig = {"layout": {"title": {"text": "figure title"}}}
199

Diff for: packages/python/plotly/requirements.txt

-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ six==1.8.0
1010

1111
## retrying requests ##
1212
retrying==1.3.3
13-
14-
## Allow pathlib2 as pathlib substitute for old Python versions ##
15-
pathlib2;python_version<"3.4"

Diff for: packages/python/plotly/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ def run(self):
505505
),
506506
("etc/jupyter/nbconfig/notebook.d", ["plotlywidget.json"]),
507507
],
508-
install_requires=["retrying>=1.3.3", "six", 'pathlib2;python_version<"3.4"'],
508+
install_requires=["retrying>=1.3.3", "six"],
509509
zip_safe=False,
510510
cmdclass=dict(
511511
build_py=js_prerelease(versioneer_cmds["build_py"]),

0 commit comments

Comments
 (0)