Skip to content

Commit

Permalink
Add httpx.URL type as allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibo-Joshi committed Oct 22, 2023
1 parent 853f2ea commit c7267fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions telegram/request/_httpxrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ class HTTPXRequest(BaseRequest):
these concepts.
.. versionadded:: NEXT.VERSION
proxy (:obj:`str` | ``httpx.Proxy``, optional): The URL to a proxy server or an
``httpx.Proxy`` object. For example ``'http://127.0.0.1:3128'`` or
``'socks5://127.0.0.1:3128'``. Defaults to :obj:`None`.
proxy (:obj:`str` | ``httpx.Proxy`` | ``httpx.URL``, optional): The URL to a proxy server,
a ``httpx.Proxy`` object or a ``httpx.URL`` object. For example
``'http://127.0.0.1:3128'`` or ``'socks5://127.0.0.1:3128'``. Defaults to :obj:`None`.
Note:
* The proxy URL can also be set via the environment variables ``HTTPS_PROXY`` or
Expand All @@ -131,7 +131,7 @@ def __init__(
pool_timeout: Optional[float] = 1.0,
http_version: HTTPVersion = "1.1",
socket_options: Optional[Collection[_SocketOpt]] = None,
proxy: Optional[Union[str, httpx.Proxy]] = None,
proxy: Optional[Union[str, httpx.Proxy, httpx.URL]] = None,
):
if proxy_url is not None and proxy is not None:
raise ValueError("The parameters `proxy_url` and `proxy` are mutually exclusive.")
Expand Down

0 comments on commit c7267fd

Please sign in to comment.