Open
Description
A warning is logged while using msrest where urllib3 issues DeprecationWarning about using 'method_whitelist' with Retry
DeprecationWarning: Using 'method_whitelist' with Retry is deprecated and will be removed in v2.0. Use 'allowed_methods' instead
Here is the code:
Proposal is to allow use of both parameters based on the version of the urllib3 like inline:
if urllib3_version < "1.26.0":
DEFAULT_RETRY = Retry(
total=MAX_RETRY,
backoff_factor=RETRY_BACKOFF_FACTOR,
method_whitelist=RETRY_METHODS,
status_forcelist=RETRY_STATUS_CODES,
raise_on_status=False,
)
else:
DEFAULT_RETRY = Retry(
total=MAX_RETRY,
backoff_factor=RETRY_BACKOFF_FACTOR,
allowed_methods=RETRY_METHODS,
status_forcelist=RETRY_STATUS_CODES,
raise_on_status=False,
)
Metadata
Metadata
Assignees
Labels
No labels