diff --git a/httpx/_config.py b/httpx/_config.py index 0dc7a460..3785af98 100644 --- a/httpx/_config.py +++ b/httpx/_config.py @@ -367,5 +367,5 @@ class Proxy: DEFAULT_TIMEOUT_CONFIG = Timeout(timeout=5.0) -DEFAULT_POOL_LIMITS = PoolLimits(soft_limit=10, hard_limit=100) +DEFAULT_POOL_LIMITS = PoolLimits(max_keepalive=10, max_connections=100) DEFAULT_MAX_REDIRECTS = 20 diff --git a/httpx/_utils.py b/httpx/_utils.py index f8faf97a..cf64d89f 100644 --- a/httpx/_utils.py +++ b/httpx/_utils.py @@ -404,4 +404,4 @@ def as_network_error(*exception_classes: type) -> typing.Iterator[None]: def warn_deprecated(message: str) -> None: - warnings.warn(message, DeprecationWarning) + warnings.warn(message, DeprecationWarning, stacklevel=2)