Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing missed arguments for pools when init transports #2997

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
24 changes: 16 additions & 8 deletions httpx/_transports/default.py
Expand Up @@ -126,9 +126,9 @@ def __init__(
limits: Limits = DEFAULT_LIMITS,
trust_env: bool = True,
proxy: typing.Optional[ProxyTypes] = None,
uds: typing.Optional[str] = None,
local_address: typing.Optional[str] = None,
retries: int = 0,
local_address: typing.Optional[str] = None,
uds: typing.Optional[str] = None,
socket_options: typing.Optional[typing.Iterable[SOCKET_OPTION]] = None,
) -> None:
ssl_context = create_ssl_context(verify=verify, cert=cert, trust_env=trust_env)
Expand All @@ -142,9 +142,9 @@ def __init__(
keepalive_expiry=limits.keepalive_expiry,
http1=http1,
http2=http2,
uds=uds,
local_address=local_address,
retries=retries,
local_address=local_address,
uds=uds,
socket_options=socket_options,
)
elif proxy.url.scheme in ("http", "https"):
Expand All @@ -164,6 +164,9 @@ def __init__(
keepalive_expiry=limits.keepalive_expiry,
http1=http1,
http2=http2,
retries=retries,
local_address=local_address,
uds=uds,
socket_options=socket_options,
)
elif proxy.url.scheme == "socks5":
Expand All @@ -189,6 +192,7 @@ def __init__(
keepalive_expiry=limits.keepalive_expiry,
http1=http1,
http2=http2,
retries=retries,
)
else: # pragma: no cover
raise ValueError(
Expand Down Expand Up @@ -267,9 +271,9 @@ def __init__(
limits: Limits = DEFAULT_LIMITS,
trust_env: bool = True,
proxy: typing.Optional[ProxyTypes] = None,
uds: typing.Optional[str] = None,
local_address: typing.Optional[str] = None,
retries: int = 0,
local_address: typing.Optional[str] = None,
uds: typing.Optional[str] = None,
socket_options: typing.Optional[typing.Iterable[SOCKET_OPTION]] = None,
) -> None:
ssl_context = create_ssl_context(verify=verify, cert=cert, trust_env=trust_env)
Expand All @@ -283,9 +287,9 @@ def __init__(
keepalive_expiry=limits.keepalive_expiry,
http1=http1,
http2=http2,
uds=uds,
local_address=local_address,
retries=retries,
local_address=local_address,
uds=uds,
socket_options=socket_options,
)
elif proxy.url.scheme in ("http", "https"):
Expand All @@ -304,6 +308,9 @@ def __init__(
keepalive_expiry=limits.keepalive_expiry,
http1=http1,
http2=http2,
retries=retries,
local_address=local_address,
uds=uds,
socket_options=socket_options,
)
elif proxy.url.scheme == "socks5":
Expand All @@ -329,6 +336,7 @@ def __init__(
keepalive_expiry=limits.keepalive_expiry,
http1=http1,
http2=http2,
retries=retries,
)
else: # pragma: no cover
raise ValueError(
Expand Down