Fix pool option warnings for default connection pool (#980)
* warn_deprecated: Set stacklevel=2 to get real source of warning * Use new pool limit options in default pool Co-authored-by: Tom Christie <tom@tomchristie.com>
This commit is contained in:
parent
c30acf09fb
commit
e724abdcd1
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user