[Python-modules-commits] [python-vertica] 01/03: Import python-vertica_0.6.14.orig.tar.gz

Jean Baptiste Favre jbfavre-guest at moszumanska.debian.org
Sat Mar 25 14:08:26 UTC 2017


This is an automated email from the git hooks/post-receive script.

jbfavre-guest pushed a commit to branch master
in repository python-vertica.

commit 179735eebecd5329cff0801379680aed8ca1e7b1
Author: Jean Baptiste Favre <debian at jbfavre.org>
Date:   Sat Mar 25 14:47:18 2017 +0100

    Import python-vertica_0.6.14.orig.tar.gz
---
 README.md                            | 4 +++-
 setup.py                             | 2 +-
 vertica_python/__init__.py           | 2 +-
 vertica_python/vertica/connection.py | 3 +++
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index ce754df..d6c2d38 100644
--- a/README.md
+++ b/README.md
@@ -81,7 +81,9 @@ conn_info = {'host': '127.0.0.1',
              # default throw error on invalid UTF-8 results
              'unicode_error': 'strict',
              # SSL is disabled by default
-             'ssl': False}
+             'ssl': False,
+             'connection_timeout': 5
+             # connection timeout is not enabled by default}
 
 # simple connection, with manual close
 connection = vertica_python.connect(**conn_info)
diff --git a/setup.py b/setup.py
index 83aec6a..d0b785a 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ opts = ReqOpts(None, 'git')
 # version should use the format 'x.x.x' (instead of 'vx.x.x')
 setup(
     name='vertica-python',
-    version='0.6.13',
+    version='0.6.14',
     description='A native Python client for the Vertica database.',
     author='Justin Berka, Alex Kim',
     author_email='justin.berka at gmail.com, alex.kim at uber.com',
diff --git a/vertica_python/__init__.py b/vertica_python/__init__.py
index 4b305d4..0376d36 100644
--- a/vertica_python/__init__.py
+++ b/vertica_python/__init__.py
@@ -6,7 +6,7 @@ from vertica_python.vertica.connection import Connection
 # Main module for this library.
 
 # The version number of this library.
-version_info = (0, 6, 13)
+version_info = (0, 6, 14)
 
 __version__ = '.'.join(map(str, version_info))
 
diff --git a/vertica_python/vertica/connection.py b/vertica_python/vertica/connection.py
index aa30ab8..b01e609 100644
--- a/vertica_python/vertica/connection.py
+++ b/vertica_python/vertica/connection.py
@@ -105,8 +105,11 @@ class Connection(object):
 
         host = self.options.get('host')
         port = self.options.get('port')
+        connection_timeout = self.options.get('connection_timeout')
         raw_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         raw_socket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
+        if connection_timeout is not None:
+            raw_socket.settimeout(connection_timeout)
         raw_socket.connect((host, port))
 
         ssl_options = self.options.get('ssl')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-vertica.git



More information about the Python-modules-commits mailing list