Skip to content

Commit

Permalink
Merge pull request #375 from umohnani8/5.0-dev
Browse files Browse the repository at this point in the history
Remove deprecated max_pools_size arg
  • Loading branch information
openshift-merge-bot[bot] authored Feb 26, 2024
2 parents 68f9296 + 0741c5e commit 4002fd1
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions podman/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def __init__(
credstore_env: Optional[Mapping[str, str]] = None,
use_ssh_client=True,
max_pool_size=None,
max_pools_size=None, # This parameter is kept only for backward compatibility.
**kwargs,
): # pylint: disable=unused-argument
"""Instantiate APIClient object.
Expand All @@ -115,7 +114,6 @@ def __init__(
num_pools: The number of connection pools to cache.
credstore_env: Environment for storing credentials.
use_ssh_client: Use system ssh agent rather than ssh module. Always, True.
max_pools_size: Deprecated! Please use 'max_pool_size'.
max_pool_size: Override number of connections pools to maintain.
Default: requests.adapters.DEFAULT_POOLSIZE
Expand All @@ -135,21 +133,6 @@ def __init__(
# where the parameters are set specifically.
http_adapter_kwargs = {}

# 'max_pools_size' has been changed to 'max_pool_size'
# and the below section is needed for backward compatible.
# This section can be removed in a future release.
if max_pools_size is not None:
warnings.warn(
"'max_pools_size' parameter is deprecated! Please use 'max_pool_size' parameter.",
ParameterDeprecationWarning,
)
if max_pool_size is not None:
raise ValueError(
"Both of 'max_pools_size' and 'max_pool_size' parameters are set. "
"Please use only the 'max_pool_size', 'max_pools_size' is deprecated!"
)
max_pool_size = max_pools_size

if num_pools is not None:
adapter_kwargs["pool_connections"] = num_pools
http_adapter_kwargs["pool_connections"] = num_pools
Expand Down

0 comments on commit 4002fd1

Please sign in to comment.