* 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>
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
def warn_deprecated(message: str) -> None:
- warnings.warn(message, DeprecationWarning)
+ warnings.warn(message, DeprecationWarning, stacklevel=2)