8000 Replaced 'retrying' dependency with 'tenacity' in plotly package by jmsmdy · Pull Request #2911 · plotly/plotly.py · GitHub
[go: up one dir, main page]

Skip to content

Replaced 'retrying' dependency with 'tenacity' in plotly package #2911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 22, 2021
Merged
Prev Previous commit
Next Next commit
Simplified tenacity code and fixed mistake with tenacity retry_if_exc…
…eption.
  • Loading branch information
jmsmdy committed Dec 11, 2020
commit a47e932e8b83eeccf8ce8f078b98c648c5a7d978
6 changes: 3 additions & 3 deletions packages/python/chart-studio/chart_studio/api/v2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ def should_retry(exception):


@tenacity.retry(
wait=tenacity.wait.wait_exponential(multiplier=1000, max=16000),
stop=tenacity.stop.stop_after_delay(180000),
retry=tenacity.retry.retry_if_exception(should_retry),
wait=tenacity.wait_exponential(multiplier=1000, max=16000),
stop=tenacity.stop_after_delay(180000),
retry=tenacity.retry_if_exception(should_retry),
)
def request(method, url, **kwargs):
"""
Expand Down
3 changes: 1 addition & 2 deletions packages/python/plotly/plotly/io/_orca.py
Original file line number Diff line number Diff line change
Expand Up @@ -1452,8 +1452,7 @@ def ensure_server():


@tenacity.retry(
wait=tenacity.wait.wait_random(min=5, max=10),
stop=tenacity.stop.stop_after_delay(60000),
wait=tenacity.wait_random(min=5, max=10), stop=tenacity.stop_after_delay(60000),
)
def request_image_with_retrying(**kwargs):
"""
Expand Down
0