python: Replace deprecated urllib3 BACKOFF_MAX.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-01-21 16:55:31 -08:00 committed by Tim Abbott
parent 2612f57d51
commit 5fb935bf60
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ def fetch_contributors(repo_name: str, max_retries: int) -> List[Contributor]:
if personal_access_token is not None: if personal_access_token is not None:
headers = {"Authorization": f"token {personal_access_token}"} headers = {"Authorization": f"token {personal_access_token}"}
Retry.BACKOFF_MAX = 64 Retry.DEFAULT_BACKOFF_MAX = 64
retry = Retry( retry = Retry(
total=max_retries, total=max_retries,
backoff_factor=2.0, backoff_factor=2.0,

View File

@ -12,7 +12,7 @@ from zerver.lib.outgoing_http import OutgoingSession
class TorDataSession(OutgoingSession): class TorDataSession(OutgoingSession):
def __init__(self, max_retries: int) -> None: def __init__(self, max_retries: int) -> None:
Retry.BACKOFF_MAX = 64 Retry.DEFAULT_BACKOFF_MAX = 64
retry = Retry( retry = Retry(
total=max_retries, total=max_retries,
backoff_factor=2.0, backoff_factor=2.0,