diff --git a/docker/client.py b/docker/client.py index c16f314a..aba066ba 100644 --- a/docker/client.py +++ b/docker/client.py @@ -60,7 +60,7 @@ class Client( ) if base_url.startswith('http+unix://'): self._custom_adapter = UnixAdapter( - base_url, timeout, num_pools=num_pools + base_url, timeout, pool_connections=num_pools ) self.mount('http+docker://', self._custom_adapter) self._unmount('http://', 'https://') @@ -72,7 +72,7 @@ class Client( ) try: self._custom_adapter = NpipeAdapter( - base_url, timeout, num_pools=num_pools + base_url, timeout, pool_connections=num_pools ) except NameError: raise errors.DockerException( diff --git a/docker/transport/npipeconn.py b/docker/transport/npipeconn.py index 917fa8b3..984049c7 100644 --- a/docker/transport/npipeconn.py +++ b/docker/transport/npipeconn.py @@ -49,11 +49,11 @@ class NpipeHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool): class NpipeAdapter(requests.adapters.HTTPAdapter): def __init__(self, base_url, timeout=60, - num_pools=constants.DEFAULT_NUM_POOLS): + pool_connections=constants.DEFAULT_NUM_POOLS): self.npipe_path = base_url.replace('npipe://', '') self.timeout = timeout self.pools = RecentlyUsedContainer( - num_pools, dispose_func=lambda p: p.close() + pool_connections, dispose_func=lambda p: p.close() ) super(NpipeAdapter, self).__init__() diff --git a/docker/transport/unixconn.py b/docker/transport/unixconn.py index b7905a04..978c87a1 100644 --- a/docker/transport/unixconn.py +++ b/docker/transport/unixconn.py @@ -51,14 +51,14 @@ class UnixHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool): class UnixAdapter(requests.adapters.HTTPAdapter): def __init__(self, socket_url, timeout=60, - num_pools=constants.DEFAULT_NUM_POOLS): + pool_connections=constants.DEFAULT_NUM_POOLS): socket_path = socket_url.replace('http+unix://', '') if not socket_path.startswith('/'): socket_path = '/' + socket_path self.socket_path = socket_path self.timeout = timeout self.pools = RecentlyUsedContainer( - num_pools, dispose_func=lambda p: p.close() + pool_connections, dispose_func=lambda p: p.close() ) super(UnixAdapter, self).__init__()