diff --git a/CHANGES/929.feature b/CHANGES/929.feature new file mode 100644 index 00000000..228f407e --- /dev/null +++ b/CHANGES/929.feature @@ -0,0 +1 @@ +Added timeout parameter for push method diff --git a/aiodocker/images.py b/aiodocker/images.py index d62a7127..ab19796c 100644 --- a/aiodocker/images.py +++ b/aiodocker/images.py @@ -157,6 +157,7 @@ async def push( auth: Optional[Union[JSONObject, str, bytes]] = None, tag: Optional[str] = None, stream: Literal[False] = False, + timeout: Union[float, Sentinel, None] = SENTINEL, ) -> Dict[str, Any]: ... @overload @@ -167,6 +168,7 @@ def push( auth: Optional[Union[JSONObject, str, bytes]] = None, tag: Optional[str] = None, stream: Literal[True], + timeout: Union[float, Sentinel, None] = SENTINEL, ) -> AsyncIterator[Dict[str, Any]]: ... def push( @@ -176,6 +178,7 @@ def push( auth: Optional[Union[JSONObject, str, bytes]] = None, tag: Optional[str] = None, stream: bool = False, + timeout: Union[float, Sentinel, None] = SENTINEL, ) -> Any: params = {} headers = { @@ -197,6 +200,7 @@ def push( "POST", params=params, headers=headers, + timeout=timeout, ) return self._handle_response(cm, stream)