From c1be4d5515c249f04bf7f260520cff4c71136df0 Mon Sep 17 00:00:00 2001 From: alplabin <122352306+alplabin@users.noreply.github.com> Date: Thu, 16 Nov 2023 18:11:55 +0900 Subject: [PATCH 1/2] fixes issue #273 --- CHANGELOG.md | 4 ++++ binance/__version__.py | 2 +- binance/lib/constants.py | 1 - binance/websocket/spot/websocket_api/__init__.py | 3 +-- binance/websocket/spot/websocket_stream.py | 3 +-- docs/source/CHANGELOG.rst | 9 +++++++++ 6 files changed, 16 insertions(+), 6 deletions(-) delete mode 100644 binance/lib/constants.py diff --git a/CHANGELOG.md b/CHANGELOG.md index b362f11..91a4cb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.5.1 - 2023-11-16 +### Fixed +- Resolve timeout parameter issue in Websocket clients (Issue #273) + ## 3.5.0 - 2023-10-26 ### Changed - Add timeout parameter to Websocket clients diff --git a/binance/__version__.py b/binance/__version__.py index dcbfb52..0c11bab 100644 --- a/binance/__version__.py +++ b/binance/__version__.py @@ -1 +1 @@ -__version__ = "3.5.0" +__version__ = "3.5.1" diff --git a/binance/lib/constants.py b/binance/lib/constants.py deleted file mode 100644 index 5c41719..0000000 --- a/binance/lib/constants.py +++ /dev/null @@ -1 +0,0 @@ -WEBSOCKET_TIMEOUT_IN_SECONDS = 5 diff --git a/binance/websocket/spot/websocket_api/__init__.py b/binance/websocket/spot/websocket_api/__init__.py index 7b6d0ff..f889525 100644 --- a/binance/websocket/spot/websocket_api/__init__.py +++ b/binance/websocket/spot/websocket_api/__init__.py @@ -1,7 +1,6 @@ from typing import Optional from binance.websocket.websocket_client import BinanceWebsocketClient -from binance.lib.constants import WEBSOCKET_TIMEOUT_IN_SECONDS class SpotWebsocketAPIClient(BinanceWebsocketClient): @@ -16,7 +15,7 @@ def __init__( on_error=None, on_ping=None, on_pong=None, - timeout=WEBSOCKET_TIMEOUT_IN_SECONDS, + timeout=None, logger=None, proxies: Optional[dict] = None, ): diff --git a/binance/websocket/spot/websocket_stream.py b/binance/websocket/spot/websocket_stream.py index 7f3f58d..ede1f4a 100644 --- a/binance/websocket/spot/websocket_stream.py +++ b/binance/websocket/spot/websocket_stream.py @@ -1,7 +1,6 @@ from typing import Optional from binance.websocket.websocket_client import BinanceWebsocketClient -from binance.lib.constants import WEBSOCKET_TIMEOUT_IN_SECONDS class SpotWebsocketStreamClient(BinanceWebsocketClient): @@ -15,7 +14,7 @@ def __init__( on_ping=None, on_pong=None, is_combined=False, - timeout=WEBSOCKET_TIMEOUT_IN_SECONDS, + timeout=None, logger=None, proxies: Optional[dict] = None, ): diff --git a/docs/source/CHANGELOG.rst b/docs/source/CHANGELOG.rst index 1f3a614..0253d86 100644 --- a/docs/source/CHANGELOG.rst +++ b/docs/source/CHANGELOG.rst @@ -2,6 +2,15 @@ Changelog ========= +3.5.1 - 2023-11-16 +------------------ + +Fixed +^^^^^^^ + +* Resolve timeout parameter issue in Websocket clients (Issue #273) + + 3.5.0 - 2023-10-26 ------------------ From 9d8898ad494a3747f45f99eb49469c9e26568c11 Mon Sep 17 00:00:00 2001 From: alplabin <122352306+alplabin@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:15:48 +0900 Subject: [PATCH 2/2] Releqse v3.5.1 --- CHANGELOG.md | 4 ++-- docs/source/CHANGELOG.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91a4cb6..ab266c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog -## 3.5.1 - 2023-11-16 +## 3.5.1 - 2023-11-17 ### Fixed -- Resolve timeout parameter issue in Websocket clients (Issue #273) +- Set the default timeout value to None in WebSocket clients ## 3.5.0 - 2023-10-26 ### Changed diff --git a/docs/source/CHANGELOG.rst b/docs/source/CHANGELOG.rst index 0253d86..f94948c 100644 --- a/docs/source/CHANGELOG.rst +++ b/docs/source/CHANGELOG.rst @@ -2,13 +2,13 @@ Changelog ========= -3.5.1 - 2023-11-16 +3.5.1 - 2023-11-17 ------------------ Fixed ^^^^^^^ -* Resolve timeout parameter issue in Websocket clients (Issue #273) +* Set the default timeout value to None in WebSocket clients 3.5.0 - 2023-10-26