Skip to content

Commit a668548

Browse files
committed
Fix urllib3 DeprecationWarning about using 'method_whitelist' with Retry
Signed-off-by: Mattt Zmuda <mattt@replicate.com>
1 parent 793868c commit a668548

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

replicate/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, api_token: Optional[str] = None) -> None:
3030
total=5,
3131
backoff_factor=2,
3232
# Only retry 500s on GET so we don't unintionally mutute data
33-
method_whitelist=["GET"],
33+
allowed_methods=["GET"],
3434
# https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors
3535
status_forcelist=[
3636
429,
@@ -54,7 +54,7 @@ def __init__(self, api_token: Optional[str] = None) -> None:
5454
write_retries = Retry(
5555
total=5,
5656
backoff_factor=2,
57-
method_whitelist=["POST", "PUT"],
57+
allowed_methods=["POST", "PUT"],
5858
# Only retry POST/PUT requests on rate limits, so we don't unintionally mutute data
5959
status_forcelist=[429],
6060
)

0 commit comments

Comments
 (0)