From e5f6c7f0f701d8f4a4164263f88be6aa54f66499 Mon Sep 17 00:00:00 2001 From: "Roberson, Martin [GBM Public]" Date: Mon, 19 Aug 2024 17:45:05 +0000 Subject: [PATCH] Chore: Make release 1.0.113 --- gs_quant/session.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gs_quant/session.py b/gs_quant/session.py index 6eb3d8b9..e34d88a3 100644 --- a/gs_quant/session.py +++ b/gs_quant/session.py @@ -476,9 +476,11 @@ async def _put_async(self, path: str, payload: Optional[Union[dict, Base]] = Non return_request_id=return_request_id) return ret - def _connect_websocket(self, path: str, headers: Optional[dict] = None, include_version=True): + def _connect_websocket(self, path: str, headers: Optional[dict] = None, include_version=True, + domain: Optional[str] = None): import websockets - url = 'ws{}{}{}'.format(self.domain[4:], '/' + self.api_version if include_version else '', path) + version_path = '/' + self.api_version if include_version else '' + url = f'{domain}{version_path}{path}' if domain else f'ws{self.domain[4:]}{version_path}{path}' extra_headers = self._headers() + list((headers or {}).items()) return websockets.connect(url, extra_headers=extra_headers,