@@ -26,15 +26,15 @@ class AsyncClient:
2626 def from_env (
2727 cls ,
2828 verify_ssl : bool = True ,
29- timeout : float = 120 ,
29+ timeout : Optional [ float ] = None ,
3030 max_retries : int = 3 ,
3131 retry_delay : float = 1.0 ,
3232 ):
3333 """Initialize AsyncClient using API key from environment variable.
3434
3535 Args:
3636 verify_ssl: Whether to verify SSL certificates
37- timeout: Request timeout in seconds
37+ timeout: Request timeout in seconds. None means no timeout (infinite)
3838 max_retries: Maximum number of retry attempts
3939 retry_delay: Delay between retries in seconds
4040 """
@@ -55,7 +55,7 @@ def __init__(
5555 self ,
5656 api_key : str = None ,
5757 verify_ssl : bool = True ,
58- timeout : float = 120 ,
58+ timeout : Optional [ float ] = None ,
5959 max_retries : int = 3 ,
6060 retry_delay : float = 1.0 ,
6161 ):
@@ -64,7 +64,7 @@ def __init__(
6464 Args:
6565 api_key: API key for authentication. If None, will try to load from environment
6666 verify_ssl: Whether to verify SSL certificates
67- timeout: Request timeout in seconds
67+ timeout: Request timeout in seconds. None means no timeout (infinite)
6868 max_retries: Maximum number of retry attempts
6969 retry_delay: Delay between retries in seconds
7070 """
@@ -90,7 +90,7 @@ def __init__(
9090 self .retry_delay = retry_delay
9191
9292 ssl = None if verify_ssl else False
93- self .timeout = ClientTimeout (total = timeout )
93+ self .timeout = ClientTimeout (total = timeout ) if timeout is not None else None
9494
9595 self .session = ClientSession (
9696 headers = self .headers , connector = TCPConnector (ssl = ssl ), timeout = self .timeout
0 commit comments