Skip to content
Myr

Changed HTTPAdapter to allow max retries to be specified when initializing.

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

authored by Daniel Lindsley · committed by Daniel Lindsley · parent eda4b55 · Browse files · 1 file+4 added−2 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+4 added−2 removed

  • other:+4 added−2 removed

1 file+4 added−2 removed

modified:requests/adapters.py+4 added-2 removed
50 unmodified lines
51 covers.5253 :param pool_connections: The number of urllib3 connection pools to cache.54 :param pool_maxsize: The maximum number of connections to save in the pool.55 :param max_retries: The maximum number of retries each connection should attempt.5657 Usage::5859 >>> import requests
2 unmodified lines
62 >>> s.mount('http://', a)63 """64 __attrs__ = ['max_retries', 'config', '_pool_connections', '_pool_maxsize']6565 def __init__(self, pool_connections=DEFAULT_POOLSIZE, pool_maxsize=DEFAULT_POOLSIZE):66 self.max_retries = DEFAULT_RETRIES66 def __init__(self, pool_connections=DEFAULT_POOLSIZE,67 pool_maxsize=DEFAULT_POOLSIZE, max_retries=DEFAULT_RETRIES):68 self.max_retries = max_retries69 self.config = {}7071 super(HTTPAdapter, self).__init__()72
261 unmodified lines