From e0bacb4228ee8bf832657058895a3c7b0cc75275 Mon Sep 17 00:00:00 2001 From: Jackson Coxson Date: Mon, 9 Oct 2023 11:18:02 -0700 Subject: [PATCH 1/2] Disable IPv6 for the requests package --- moabdb/proto_wrapper.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/moabdb/proto_wrapper.py b/moabdb/proto_wrapper.py index f062691..cf89ed7 100644 --- a/moabdb/proto_wrapper.py +++ b/moabdb/proto_wrapper.py @@ -7,6 +7,12 @@ from .protocol_pb2 import Request as _Req, Response as _Response from . import errors +# IPv6 address takes about 180 seconds to connect +# Dirty fix until a proper investigation is done +# Might break other code the user runs if connecting to IPv6 +# pylint: disable=no-member +requests.packages.urllib3.util.connection.HAS_IPV6 = False + REQUEST = _Req RESPONSE = _Response From 1412eee8cbae88d834ac566a9afc4d1ef9f82a71 Mon Sep 17 00:00:00 2001 From: Jackson Coxson Date: Mon, 9 Oct 2023 11:21:03 -0700 Subject: [PATCH 2/2] Correct grammar typo for premium dataset warning --- moabdb/core.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/moabdb/core.py b/moabdb/core.py index 529be75..87cafc6 100644 --- a/moabdb/core.py +++ b/moabdb/core.py @@ -39,7 +39,6 @@ from .constants import pd, Union, cf - def get_equity(tickers: Union[str, list], sample: str = "1m", start: str = None, @@ -335,7 +334,7 @@ def get_rates(sample: str = "1y", # Check authorization if not _check_access(): raise errors.MoabRequestError( - "Premium datasets needs API credentials, see moabdb.com") + "Premium datasets need API credentials, see moabdb.com") # String time to integer time start_tm, end_tm = timewindows.get_unix_dates(sample, start, end)