~ubuntu-branches/ubuntu/trusty/python-happybase/trusty

« back to all changes in this revision

Viewing changes to happybase/connection.py

  • Committer: Package Import Robot
  • Author(s): Thomas Goirand
  • Date: 2013-10-19 22:59:58 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20131019225958-faqk2cdna6ykbgu6
Tags: 0.7-1
* New upstream release (Closes: #730368).
* Drops python-nosexcover as its not being used by the tests.
* Do not build-depends on openstack-pkg-tools anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
logger = logging.getLogger(__name__)
19
19
 
20
 
COMPAT_MODES = ('0.90', '0.92')
 
20
COMPAT_MODES = ('0.90', '0.92', '0.94')
21
21
THRIFT_TRANSPORTS = dict(
22
22
    buffered=TBufferedTransport,
23
23
    framed=TFramedTransport,
25
25
 
26
26
DEFAULT_HOST = 'localhost'
27
27
DEFAULT_PORT = 9090
 
28
DEFAULT_TRANSPORT = 'buffered'
 
29
DEFAULT_COMPAT = '0.94'
28
30
 
29
31
 
30
32
class Connection(object):
83
85
    """
84
86
    def __init__(self, host=DEFAULT_HOST, port=DEFAULT_PORT, timeout=None,
85
87
                 autoconnect=True, table_prefix=None,
86
 
                 table_prefix_separator='_', compat='0.92',
87
 
                 transport='buffered'):
 
88
                 table_prefix_separator='_', compat=DEFAULT_COMPAT,
 
89
                 transport=DEFAULT_TRANSPORT):
88
90
 
89
91
        if transport not in THRIFT_TRANSPORTS:
90
92
            raise ValueError("'transport' must be one of %s"