chore: bump version to 14.4.5 and make close methods async with destructor warning

This commit is contained in:
2024-12-02 11:28:53 +00:00
parent 69e40a89fe
commit 16f96316c0
9 changed files with 8 additions and 7 deletions
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
[metadata]
name = yura
version = 14.4.4
version = 14.4.5
description = Yura async AI client
author = retoor
author_email = retoor@retoor.io
+1 -1
View File
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: yura
Version: 14.4.4
Version: 14.4.5
Summary: Yura async AI client
Author: retoor
Author-email: retoor@retoor.io
+6 -5
View File
@@ -53,14 +53,14 @@ class AsyncRPCClient:
return call
def close(self):
async def close(self):
if self._ws:
self._ws.close()
await self._ws.close()
self._ws = None
def __del__(self):
self.close()
if self._ws:
raise Exception("ASyncRPCClient destructed without closing connection properly.")
class AsyncClient:
@@ -92,7 +92,8 @@ class AsyncClient:
async def connect(self, name):
return await self.client.connect(name)
def __del__(self):
async def close(self):
await self.client.close()
self.client = None