Skip to content

Commit 6bf5849

Browse files
authored
Replaced 'retrying' dependency with 'tenacity' in plotly package (#2911)
* replaced retrying dependency with tenacity in plotly package Co-authored-by: jmsmdy <[email protected]>
1 parent cb82e29 commit 6bf5849

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

Diff for: .circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ jobs:
327327
- checkout
328328
- run:
329329
name: Install tox
330-
command: "sudo pip install retrying tox black inflect"
330+
command: "sudo pip install tenacity tox black inflect"
331331
- run:
332332
name: Update jupyterlab-plotly version
333333
command: "cd packages/python/plotly; python setup.py updateplotlywidgetversion"

Diff for: .circleci/create_conda_optional_env.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [ ! -d $HOME/miniconda/envs/circle_optional ]; then
1616
# Create environment
1717
# PYTHON_VERSION=2.7 or 3.5
1818
$HOME/miniconda/bin/conda create -n circle_optional --yes python=$PYTHON_VERSION \
19-
requests nbformat six retrying psutil pandas decorator pytest mock nose poppler xarray scikit-image ipython jupyter ipykernel ipywidgets statsmodels
19+
requests nbformat six retrying tenacity psutil pandas decorator pytest mock nose poppler xarray scikit-image ipython jupyter ipykernel ipywidgets statsmodels
2020

2121
# Install orca into environment
2222
$HOME/miniconda/bin/conda install --yes -n circle_optional -c plotly plotly-orca==1.3.1

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

+7-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from copy import copy
1212
from contextlib import contextmanager
1313

14-
import retrying
14+
import tenacity
1515
from six import string_types
1616

1717
import _plotly_utils.utils
@@ -1173,11 +1173,11 @@ def validate_executable():
11731173
11741174
>>> import plotly.io as pio
11751175
>>> pio.orca.config.use_xvfb = True
1176-
1176+
11771177
You can save this configuration for use in future sessions as follows:
11781178
1179-
>>> pio.orca.config.save()
1180-
1179+
>>> pio.orca.config.save()
1180+
11811181
See https://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml
11821182
for more info on Xvfb
11831183
"""
@@ -1451,7 +1451,9 @@ def ensure_server():
14511451
orca_state["shutdown_timer"] = t
14521452

14531453

1454-
@retrying.retry(wait_random_min=5, wait_random_max=10, stop_max_delay=60000)
1454+
@tenacity.retry(
1455+
wait=tenacity.wait_random(min=5, max=10), stop=tenacity.stop_after_delay(60000),
1456+
)
14551457
def request_image_with_retrying(**kwargs):
14561458
"""
14571459
Helper method to perform an image request to a running orca server process

Diff for: packages/python/plotly/recipe/meta.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ requirements:
2424
- setuptools
2525
run:
2626
- python
27-
- retrying >=1.3.3
27+
- tenacity >=6.2.0
2828
- six
2929

3030
test:

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
###################################################
77

88
## python 2 to 3 compatibility ##
9-
six==1.8.0
9+
six==1.15.0
1010

1111
## retrying requests ##
12-
retrying==1.3.3
12+
tenacity>=6.2.0

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"],
508+
install_requires=["tenacity>=6.2.0", "six"],
509509
zip_safe=False,
510510
cmdclass=dict(
511511
build_py=js_prerelease(versioneer_cmds["build_py"]),

Diff for: packages/python/plotly/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ deps=
5555
requests==2.12.4
5656
six==1.10.0
5757
pytz==2016.10
58-
retrying==1.3.3
58+
tenacity==6.2.0
5959
pytest==3.5.1
6060
pandas==0.24.2
6161
numpy==1.19.5

0 commit comments

Comments
 (0)