Improve requests.adapters.HttpAdapter.__init__ (#5266)

The `max_retries` argument can be `None`. It's handled here as `retries`:

https://github.com/urllib3/urllib3/blob/main/src/urllib3/util/retry.py#L235
This commit is contained in:
Jukka Lehtosalo
2021-04-30 14:15:13 +01:00
committed by GitHub
parent 2a1aa88fd9
commit aff821c538

View File

@@ -53,7 +53,11 @@ class HTTPAdapter(BaseAdapter):
config: Any
proxy_manager: Any
def __init__(
self, pool_connections: int = ..., pool_maxsize: int = ..., max_retries: Union[Retry, int] = ..., pool_block: bool = ...
self,
pool_connections: int = ...,
pool_maxsize: int = ...,
max_retries: Union[Retry, int, None] = ...,
pool_block: bool = ...,
) -> None: ...
poolmanager: Any
def init_poolmanager(self, connections, maxsize, block=..., **pool_kwargs): ...