22# SPDX-License-Identifier: MIT
33
44import logging
5- import typing
6- from typing import Dict , Type , TypeVar , Any , Generator
5+ from typing import Dict , Type , TypeVar , Any , Union
76
87import httpx
98import pydantic
@@ -23,17 +22,17 @@ def __init__(self):
2322 self .sync_client = httpx .Client ()
2423 self .async_client = httpx .AsyncClient ()
2524
26- def request (self , method : str , url : URL | str , ** kwargs : Any ) -> Response :
25+ def request (self , method : str , url : Union [ URL , str ] , ** kwargs : Any ) -> Response :
2726 return self .sync_client .request (method , url , ** kwargs )
2827
29- def stream (self , method : str , url : URL | str , ** kwargs : Any ):
28+ def stream (self , method : str , url : Union [ URL , str ] , ** kwargs : Any ):
3029 """Return synchronous stream context manager"""
3130 return self .sync_client .stream (method , url , ** kwargs )
3231
33- async def arequest (self , method : str , url : URL | str , ** kwargs : Any ) -> Response :
32+ async def arequest (self , method : str , url : Union [ URL , str ] , ** kwargs : Any ) -> Response :
3433 return await self .async_client .request (method , url , ** kwargs )
3534
36- def astream (self , method : str , url : URL | str , ** kwargs : Any ):
35+ def astream (self , method : str , url : Union [ URL , str ] , ** kwargs : Any ):
3736 """Return asynchronous stream context manager"""
3837 return self .async_client .stream (method , url , ** kwargs )
3938
0 commit comments