diff --git a/.circleci/config.yml b/.circleci/config.yml index fae56c4ceae..c80a69b5129 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -327,7 +327,7 @@ jobs: - checkout - run: name: Install tox - command: "sudo pip install retrying tox black inflect" + command: "sudo pip install tenacity tox black inflect" - run: name: Update jupyterlab-plotly version command: "cd packages/python/plotly; python setup.py updateplotlywidgetversion" diff --git a/.circleci/create_conda_optional_env.sh b/.circleci/create_conda_optional_env.sh index 17f3c999af8..4929c8ee529 100755 --- a/.circleci/create_conda_optional_env.sh +++ b/.circleci/create_conda_optional_env.sh @@ -16,7 +16,7 @@ if [ ! -d $HOME/miniconda/envs/circle_optional ]; then # Create environment # PYTHON_VERSION=2.7 or 3.5 $HOME/miniconda/bin/conda create -n circle_optional --yes python=$PYTHON_VERSION \ -requests nbformat six retrying psutil pandas decorator pytest mock nose poppler xarray scikit-image ipython jupyter ipykernel ipywidgets statsmodels +requests nbformat six retrying tenacity psutil pandas decorator pytest mock nose poppler xarray scikit-image ipython jupyter ipykernel ipywidgets statsmodels # Install orca into environment $HOME/miniconda/bin/conda install --yes -n circle_optional -c plotly plotly-orca==1.3.1 diff --git a/packages/python/plotly/plotly/io/_orca.py b/packages/python/plotly/plotly/io/_orca.py index 500674b6281..63152739f17 100644 --- a/packages/python/plotly/plotly/io/_orca.py +++ b/packages/python/plotly/plotly/io/_orca.py @@ -11,7 +11,7 @@ from copy import copy from contextlib import contextmanager -import retrying +import tenacity from six import string_types import _plotly_utils.utils @@ -1173,11 +1173,11 @@ def validate_executable(): >>> import plotly.io as pio >>> pio.orca.config.use_xvfb = True - + You can save this configuration for use in future sessions as follows: - >>> pio.orca.config.save() - + >>> pio.orca.config.save() + See https://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml for more info on Xvfb """ @@ -1451,7 +1451,9 @@ def ensure_server(): orca_state["shutdown_timer"] = t -@retrying.retry(wait_random_min=5, wait_random_max=10, stop_max_delay=60000) +@tenacity.retry( + wait=tenacity.wait_random(min=5, max=10), stop=tenacity.stop_after_delay(60000), +) def request_image_with_retrying(**kwargs): """ Helper method to perform an image request to a running orca server process diff --git a/packages/python/plotly/recipe/meta.yaml b/packages/python/plotly/recipe/meta.yaml index 2110405d335..cbb2683d1e4 100644 --- a/packages/python/plotly/recipe/meta.yaml +++ b/packages/python/plotly/recipe/meta.yaml @@ -24,7 +24,7 @@ requirements: - setuptools run: - python - - retrying >=1.3.3 + - tenacity >=6.2.0 - six test: diff --git a/packages/python/plotly/requirements.txt b/packages/python/plotly/requirements.txt index 496204893c7..6800b7f43a5 100644 --- a/packages/python/plotly/requirements.txt +++ b/packages/python/plotly/requirements.txt @@ -6,7 +6,7 @@ ################################################### ## python 2 to 3 compatibility ## -six==1.8.0 +six==1.15.0 ## retrying requests ## -retrying==1.3.3 +tenacity>=6.2.0 diff --git a/packages/python/plotly/setup.py b/packages/python/plotly/setup.py index 395111c03e9..566d0c2c6ba 100644 --- a/packages/python/plotly/setup.py +++ b/packages/python/plotly/setup.py @@ -505,7 +505,7 @@ def run(self): ), ("etc/jupyter/nbconfig/notebook.d", ["plotlywidget.json"]), ], - install_requires=["retrying>=1.3.3", "six"], + install_requires=["tenacity>=6.2.0", "six"], zip_safe=False, cmdclass=dict( build_py=js_prerelease(versioneer_cmds["build_py"]), diff --git a/packages/python/plotly/tox.ini b/packages/python/plotly/tox.ini index 72169192a08..f27db05b7f5 100644 --- a/packages/python/plotly/tox.ini +++ b/packages/python/plotly/tox.ini @@ -55,7 +55,7 @@ deps= requests==2.12.4 six==1.10.0 pytz==2016.10 - retrying==1.3.3 + tenacity==6.2.0 pytest==3.5.1 pandas==0.24.2 xarray==0.10.9