Skip to content
Myr

Update how we handle retries to be consistent with documentation

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Ian Cordasco · committed by Ian Cordasco · parent 9dc6602 · Browse files · 1 file+6 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−3 removed

  • other:+6 added−3 removed

1 file+6 added−3 removed

modified:requests/adapters.py+6 added-3 removed
31 unmodified lines
32from .auth import _basic_auth_str3334DEFAULT_POOLBLOCK = False35DEFAULT_POOLSIZE = 1036DEFAULT_RETRIES = 036DEFAULT_RETRIES = object()373839class BaseAdapter(object):40 """The Base Transport Adapter"""
37 unmodified lines
7879 def __init__(self, pool_connections=DEFAULT_POOLSIZE,80 pool_maxsize=DEFAULT_POOLSIZE, max_retries=DEFAULT_RETRIES,81 pool_block=DEFAULT_POOLBLOCK):82 self.max_retries = max_retries82 if max_retries is DEFAULT_RETRIES:83 self.max_retries = Retry(0, read=False)84 else:85 self.max_retries = Retry.from_int(max_retries)86 self.config = {}87 self.proxy_manager = {}8889 super(HTTPAdapter, self).__init__()
272 unmodified lines
362 redirect=False,363 assert_same_host=False,364 preload_content=False,365 decode_content=False,363 retries=Retry(self.max_retries, read=False),366 retries=self.max_retries,367 timeout=timeout368 )369370 # Send the request.
61 unmodified lines