Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Commit e78df40

Browse files
committed
Added version checking.
1 parent 950a476 commit e78df40

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "thetadata"
7-
version = "0.5.5"
7+
version = "0.5.6"
88
authors = [
99
{ name="Adler Weber", email="[email protected]" },
1010
{ name="Bailey Danseglio", email="[email protected]" },

thetadata/client.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
"""Module that contains Theta Client class."""
2-
import os
32
import re
43
import shutil
54
import subprocess
6-
import warnings
75
from decimal import Decimal
86
from threading import Thread
97
from time import sleep
@@ -115,6 +113,7 @@ def connect(self):
115113
' Try restarting your system.')
116114
sleep(1)
117115
self._server.settimeout(self.timeout)
116+
#self._send_ver()
118117
yield
119118
finally:
120119
if self.launch:
@@ -150,6 +149,10 @@ def _recv(self, n_bytes: int, progress_bar: bool = False) -> bytearray:
150149
assert bytes_downloaded == n_bytes
151150
return buffer
152151

152+
def _send_ver(self):
153+
ver_msg = f"MSG_CODE={MessageType.HIST.value}&version=0.5.6\n"
154+
self._server.sendall(ver_msg.encode("utf-8"))
155+
153156
def kill(self, ignore_err=True) -> None:
154157
"""Remotely kill the Terminal process.
155158

thetadata/enums.py

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ class MessageType(enum.Enum):
129129
INFO = 2
130130
METADATA = 3
131131
CONNECTED = 4
132+
VERSION = 5
132133

133134
# API communication
134135
PING = 100

0 commit comments

Comments
 (0)