summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWouter Bolsterlee <uws@xs4all.nl>2013-11-03 17:48:35 +0100
committerWouter Bolsterlee <uws@xs4all.nl>2013-11-03 17:48:35 +0100
commit442cbaf099facd7254ad2d2328657ba33ac28a61 (patch)
treee738b5f46d94e3f705caab97625a7a7a146eaba5
parent615093082a9661e62b286bc51cdac5462887e66b (diff)
downloadhappybase-442cbaf099facd7254ad2d2328657ba33ac28a61.tar.gz
Add new "0.94" compat mode and make it the default
At this point there is no difference between 0.92 and 0.94 though, but that might change in the future.
-rw-r--r--happybase/connection.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/happybase/connection.py b/happybase/connection.py
index 6256042..e0eb549 100644
--- a/happybase/connection.py
+++ b/happybase/connection.py
@@ -17,7 +17,7 @@ from .util import pep8_to_camel_case
logger = logging.getLogger(__name__)
-COMPAT_MODES = ('0.90', '0.92')
+COMPAT_MODES = ('0.90', '0.92', '0.94')
THRIFT_TRANSPORTS = dict(
buffered=TBufferedTransport,
framed=TFramedTransport,
@@ -25,6 +25,8 @@ THRIFT_TRANSPORTS = dict(
DEFAULT_HOST = 'localhost'
DEFAULT_PORT = 9090
+DEFAULT_TRANSPORT = 'buffered'
+DEFAULT_COMPAT = '0.94'
class Connection(object):
@@ -83,8 +85,8 @@ class Connection(object):
"""
def __init__(self, host=DEFAULT_HOST, port=DEFAULT_PORT, timeout=None,
autoconnect=True, table_prefix=None,
- table_prefix_separator='_', compat='0.92',
- transport='buffered'):
+ table_prefix_separator='_', compat=DEFAULT_COMPAT,
+ transport=DEFAULT_TRANSPORT):
if transport not in THRIFT_TRANSPORTS:
raise ValueError("'transport' must be one of %s"