From b967d90da4884a025bfe72615e0ff57401141d25 Mon Sep 17 00:00:00 2001 From: uJhin Date: Wed, 1 Dec 2021 11:09:15 +0900 Subject: [PATCH 1/2] [Update] Upbit OPEN API v1.2.2 --- client/python/upbit/pkginfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/python/upbit/pkginfo.py b/client/python/upbit/pkginfo.py index 450bff6..0c3e0f6 100644 --- a/client/python/upbit/pkginfo.py +++ b/client/python/upbit/pkginfo.py @@ -4,7 +4,7 @@ Please read the official Upbit Client document. Documents: https://ujhin.github.io/upbit-client-docs/ -- Upbit OPEN API Version: 1.2.0 +- Upbit OPEN API Version: 1.2.2 - Author: ujhin - Email: ujhin942@gmail.com - GitHub: https://github.com/uJhin From c13ea9ae228f3a283484d298e33e8bae48aea8df Mon Sep 17 00:00:00 2001 From: uJhin Date: Wed, 1 Dec 2021 11:15:41 +0900 Subject: [PATCH 2/2] [Fix] Websocket package version issues Websocket package version issues: The aaugustin websockets library before 9.1 for Python has an Observable Timing Discrepancy on servers when HTTP Basic Authentication is enabled with basic_auth_protocol_factory(credentials=...). An attacker may be able to guess a password via a timing attack. --- client/python/requirements.txt | 2 +- client/python/upbit/pkginfo.py | 2 +- client/python/upbit/websocket.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/python/requirements.txt b/client/python/requirements.txt index cf26b3a..8600bd4 100644 --- a/client/python/requirements.txt +++ b/client/python/requirements.txt @@ -44,5 +44,5 @@ typing-extensions==3.7.4.3 urllib3==1.26.4 webcolors==1.11.1 webencodings==0.5.1 -websockets==8.1 +websockets==10.1 wrapt==1.12.1 diff --git a/client/python/upbit/pkginfo.py b/client/python/upbit/pkginfo.py index 0c3e0f6..f3489f3 100644 --- a/client/python/upbit/pkginfo.py +++ b/client/python/upbit/pkginfo.py @@ -29,7 +29,7 @@ def _get_versions(package_name): PACKAGE_NAME = 'upbit-client' OPEN_API_VERSION = '1.2.2' -CURRENT_VERSION = OPEN_API_VERSION+'.0' +CURRENT_VERSION = OPEN_API_VERSION+'.1' RELEASED_VERSION = _get_versions(PACKAGE_NAME) LATEST_VERSION = RELEASED_VERSION[0] diff --git a/client/python/upbit/websocket.py b/client/python/upbit/websocket.py index 4bb0c1d..a6e3787 100644 --- a/client/python/upbit/websocket.py +++ b/client/python/upbit/websocket.py @@ -172,12 +172,12 @@ def generate_payload( return json.dumps(payload) - async def __aenter__(self) -> websockets.client.WebSocketClientProtocol: + async def __aenter__(self): return await self.Connection.__aenter__() - async def __aexit__(self, exc_type, exc_value, traceback) -> None: + async def __aexit__(self, exc_type, exc_value, traceback): await self.Connection.__aexit__(exc_type, exc_value, traceback) - + def __str__(self): return self.__repr__()