Skip to content

Commit 940e72d

Browse files
committed
Remove deprecated parameters
1 parent c7a91c1 commit 940e72d

3 files changed

Lines changed: 6 additions & 31 deletions

File tree

src/httpc/_api.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
from httpx._config import DEFAULT_TIMEOUT_CONFIG
77

88
if typing.TYPE_CHECKING:
9+
import ssl as _ssl
910
from httpx._types import (
1011
AuthTypes,
1112
CertTypes,
1213
CookieTypes,
1314
HeaderTypes,
14-
ProxiesTypes,
1515
ProxyTypes,
1616
QueryParamTypes,
1717
RequestContent,
1818
RequestData,
1919
RequestFiles,
2020
TimeoutTypes,
21-
VerifyTypes,
2221
)
2322
from httpx._urls import URL
23+
VerifyTypes = _ssl.SSLContext | str | bool
2424

2525
from ._client import Client
2626
from ._parse import Response
@@ -51,7 +51,6 @@ def request(
5151
cookies: CookieTypes | None = None,
5252
auth: AuthTypes | None = None,
5353
proxy: ProxyTypes | None = None,
54-
proxies: ProxiesTypes | None = None,
5554
timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG,
5655
follow_redirects: bool = False,
5756
verify: VerifyTypes = True,
@@ -63,7 +62,6 @@ def request(
6362
with Client(
6463
cookies=cookies,
6564
proxy=proxy,
66-
proxies=proxies,
6765
cert=cert,
6866
verify=verify,
6967
timeout=timeout,
@@ -99,7 +97,6 @@ def stream(
9997
cookies: CookieTypes | None = None,
10098
auth: AuthTypes | None = None,
10199
proxy: ProxyTypes | None = None,
102-
proxies: ProxiesTypes | None = None,
103100
timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG,
104101
follow_redirects: bool = False,
105102
verify: VerifyTypes = True,
@@ -111,7 +108,6 @@ def stream(
111108
with Client(
112109
cookies=cookies,
113110
proxy=proxy,
114-
proxies=proxies,
115111
cert=cert,
116112
verify=verify,
117113
timeout=timeout,
@@ -142,7 +138,6 @@ def get(
142138
cookies: CookieTypes | None = None,
143139
auth: AuthTypes | None = None,
144140
proxy: ProxyTypes | None = None,
145-
proxies: ProxiesTypes | None = None,
146141
follow_redirects: bool = False,
147142
cert: CertTypes | None = None,
148143
verify: VerifyTypes = True,
@@ -159,7 +154,6 @@ def get(
159154
cookies=cookies,
160155
auth=auth,
161156
proxy=proxy,
162-
proxies=proxies,
163157
follow_redirects=follow_redirects,
164158
cert=cert,
165159
verify=verify,
@@ -178,7 +172,6 @@ def options(
178172
cookies: CookieTypes | None = None,
179173
auth: AuthTypes | None = None,
180174
proxy: ProxyTypes | None = None,
181-
proxies: ProxiesTypes | None = None,
182175
follow_redirects: bool = False,
183176
cert: CertTypes | None = None,
184177
verify: VerifyTypes = True,
@@ -195,7 +188,6 @@ def options(
195188
cookies=cookies,
196189
auth=auth,
197190
proxy=proxy,
198-
proxies=proxies,
199191
follow_redirects=follow_redirects,
200192
cert=cert,
201193
verify=verify,
@@ -214,7 +206,6 @@ def head(
214206
cookies: CookieTypes | None = None,
215207
auth: AuthTypes | None = None,
216208
proxy: ProxyTypes | None = None,
217-
proxies: ProxiesTypes | None = None,
218209
follow_redirects: bool = False,
219210
cert: CertTypes | None = None,
220211
verify: VerifyTypes = True,
@@ -231,7 +222,6 @@ def head(
231222
cookies=cookies,
232223
auth=auth,
233224
proxy=proxy,
234-
proxies=proxies,
235225
follow_redirects=follow_redirects,
236226
cert=cert,
237227
verify=verify,
@@ -254,7 +244,6 @@ def post(
254244
cookies: CookieTypes | None = None,
255245
auth: AuthTypes | None = None,
256246
proxy: ProxyTypes | None = None,
257-
proxies: ProxiesTypes | None = None,
258247
follow_redirects: bool = False,
259248
cert: CertTypes | None = None,
260249
verify: VerifyTypes = True,
@@ -275,7 +264,6 @@ def post(
275264
cookies=cookies,
276265
auth=auth,
277266
proxy=proxy,
278-
proxies=proxies,
279267
follow_redirects=follow_redirects,
280268
cert=cert,
281269
verify=verify,
@@ -298,7 +286,6 @@ def put(
298286
cookies: CookieTypes | None = None,
299287
auth: AuthTypes | None = None,
300288
proxy: ProxyTypes | None = None,
301-
proxies: ProxiesTypes | None = None,
302289
follow_redirects: bool = False,
303290
cert: CertTypes | None = None,
304291
verify: VerifyTypes = True,
@@ -319,7 +306,6 @@ def put(
319306
cookies=cookies,
320307
auth=auth,
321308
proxy=proxy,
322-
proxies=proxies,
323309
follow_redirects=follow_redirects,
324310
cert=cert,
325311
verify=verify,
@@ -342,7 +328,6 @@ def patch(
342328
cookies: CookieTypes | None = None,
343329
auth: AuthTypes | None = None,
344330
proxy: ProxyTypes | None = None,
345-
proxies: ProxiesTypes | None = None,
346331
follow_redirects: bool = False,
347332
cert: CertTypes | None = None,
348333
verify: VerifyTypes = True,
@@ -363,7 +348,6 @@ def patch(
363348
cookies=cookies,
364349
auth=auth,
365350
proxy=proxy,
366-
proxies=proxies,
367351
follow_redirects=follow_redirects,
368352
cert=cert,
369353
verify=verify,
@@ -382,7 +366,6 @@ def delete(
382366
cookies: CookieTypes | None = None,
383367
auth: AuthTypes | None = None,
384368
proxy: ProxyTypes | None = None,
385-
proxies: ProxiesTypes | None = None,
386369
follow_redirects: bool = False,
387370
cert: CertTypes | None = None,
388371
verify: VerifyTypes = True,
@@ -399,7 +382,6 @@ def delete(
399382
cookies=cookies,
400383
auth=auth,
401384
proxy=proxy,
402-
proxies=proxies,
403385
follow_redirects=follow_redirects,
404386
cert=cert,
405387
verify=verify,

src/httpc/_client.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@
1818

1919
if typing.TYPE_CHECKING:
2020
# from httpx._models import Request
21+
import ssl as _ssl
2122
from httpx._transports.base import AsyncBaseTransport, BaseTransport
2223
from httpx._types import (
2324
AuthTypes,
2425
CertTypes,
2526
CookieTypes,
2627
HeaderTypes,
27-
ProxiesTypes,
2828
ProxyTypes,
2929
QueryParamTypes,
3030
RequestContent,
3131
RequestData,
3232
RequestExtensions,
3333
RequestFiles,
3434
TimeoutTypes,
35-
VerifyTypes,
3635
)
3736
from httpx._urls import URL
37+
VerifyTypes = _ssl.SSLContext | str | bool
3838

3939
__all__ = ["AsyncClient", "Client"]
4040

@@ -54,7 +54,6 @@ def __init__(
5454
http1: bool = True,
5555
http2: bool = False,
5656
proxy: ProxyTypes | None = None,
57-
proxies: ProxiesTypes | None = None,
5857
mounts: None | (typing.Mapping[str, BaseTransport | None]) = None,
5958
timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG,
6059
follow_redirects: bool = False,
@@ -79,7 +78,6 @@ def __init__(
7978
http1=http1,
8079
http2=http2,
8180
proxy=proxy,
82-
proxies=proxies,
8381
mounts=mounts,
8482
timeout=timeout,
8583
follow_redirects=follow_redirects,
@@ -88,7 +86,6 @@ def __init__(
8886
event_hooks=event_hooks,
8987
base_url=base_url,
9088
transport=transport,
91-
app=app,
9289
trust_env=trust_env,
9390
default_encoding=default_encoding,
9491
)
@@ -516,7 +513,6 @@ def __init__(
516513
http1: bool = True,
517514
http2: bool = False,
518515
proxy: ProxyTypes | None = None,
519-
proxies: ProxiesTypes | None = None,
520516
mounts: None | (typing.Mapping[str, AsyncBaseTransport | None]) = None,
521517
timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG,
522518
follow_redirects: bool = False,
@@ -541,7 +537,6 @@ def __init__(
541537
http1=http1,
542538
http2=http2,
543539
proxy=proxy,
544-
proxies=proxies,
545540
mounts=mounts,
546541
timeout=timeout,
547542
follow_redirects=follow_redirects,
@@ -550,7 +545,6 @@ def __init__(
550545
event_hooks=event_hooks,
551546
base_url=base_url,
552547
transport=transport,
553-
app=app,
554548
trust_env=trust_env,
555549
default_encoding=default_encoding,
556550
)

src/httpc/_options.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from dataclasses import asdict, dataclass, fields
77

88
if typing.TYPE_CHECKING:
9+
import ssl as _ssl
910
from httpx._client import EventHook
1011
from httpx._config import Limits
1112
from httpx._transports.base import BaseTransport
@@ -14,13 +15,12 @@
1415
CertTypes,
1516
CookieTypes,
1617
HeaderTypes,
17-
ProxiesTypes,
1818
ProxyTypes,
1919
QueryParamTypes,
2020
TimeoutTypes,
2121
URLTypes,
22-
VerifyTypes,
2322
)
23+
VerifyTypes = _ssl.SSLContext | str | bool
2424

2525
from httpc._api import request
2626
from httpc._client import AsyncClient, Client
@@ -80,7 +80,6 @@ class ClientOptions:
8080
http1: bool | None = None
8181
http2: bool | None = None
8282
proxy: ProxyTypes | None = None
83-
proxies: ProxiesTypes | None = None
8483
mounts: typing.Mapping[str, BaseTransport | None] | None = None
8584
timeout: TimeoutTypes = None
8685
follow_redirects: bool | None = None

0 commit comments

Comments
 (0)