diff --git a/polygon/websocket/websocket_client.py b/polygon/websocket/websocket_client.py index 3c046485..fae2d0c5 100644 --- a/polygon/websocket/websocket_client.py +++ b/polygon/websocket/websocket_client.py @@ -1,4 +1,5 @@ import signal +import ssl import threading from typing import Optional, Callable @@ -39,11 +40,11 @@ def __init__(self, cluster: str, auth_key: str, process_message: Optional[Callab # TODO: this probably isn't great design. # If the user defines their own signal handler then this will gets overwritten. # We still need to make sure that killing, terminating, interrupting the program closes the connection - signal.signal(signal.SIGINT, self._cleanup_signal_handler()) - signal.signal(signal.SIGTERM, self._cleanup_signal_handler()) + # signal.signal(signal.SIGINT, self._cleanup_signal_handler()) + # signal.signal(signal.SIGTERM, self._cleanup_signal_handler()) def run(self): - self.ws.run_forever() + self.ws.run_forever(skip_utf8_validation=True, sslopt={"cert_reqs": ssl.CERT_NONE}) def run_async(self): self._run_thread = threading.Thread(target=self.run) diff --git a/setup.py b/setup.py index 45095315..fd16d732 100644 --- a/setup.py +++ b/setup.py @@ -5,11 +5,6 @@ import os import sys -version = os.getenv("VERSION") -if not version: - print("no version supplied") - sys.exit(1) - def get_readme_md_contents(): """read the contents of your README file""" with open("README.md", encoding='utf-8') as f: @@ -18,7 +13,7 @@ def get_readme_md_contents(): setup( name="polygon-api-client", - version=version, + version=0.9, description="Polygon API client", long_description=get_readme_md_contents(), long_description_content_type="text/markdown",