Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dirty Fix: Disable IPv6 #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions moabdb/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
from .constants import pd, Union, cf



def get_equity(tickers: Union[str, list],
sample: str = "1m",
start: str = None,
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions moabdb/proto_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down