Skip to content
Myr

Fix pool option warnings for default connection pool (#980)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* warn_deprecated: Set stacklevel=2 to get real source of warning * Use new pool limit options in default pool

authored by Jamie Hewland · committed by GitHub · parent c30acf0 · Browse files · 2 files+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Tom Christie <tom@tomchristie.com>

Diff stats

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:httpx/_config.py+1 added-1 removed
365 unmodified lines
366 )367368369DEFAULT_TIMEOUT_CONFIG = Timeout(timeout=5.0)370DEFAULT_POOL_LIMITS = PoolLimits(soft_limit=10, hard_limit=100)370DEFAULT_POOL_LIMITS = PoolLimits(max_keepalive=10, max_connections=100)371DEFAULT_MAX_REDIRECTS = 20
modified:httpx/_utils.py+1 added-1 removed
402 unmodified lines
403 raise404405406def warn_deprecated(message: str) -> None:407 warnings.warn(message, DeprecationWarning)407 warnings.warn(message, DeprecationWarning, stacklevel=2)