[ARVADOS] updated: b434a3a88bffcf068b500c430d6a0db0c6923190

git at public.curoverse.com git at public.curoverse.com
Wed Mar 4 11:56:18 EST 2015


Summary of changes:
 sdk/python/arvados/keep.py | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

       via  b434a3a88bffcf068b500c430d6a0db0c6923190 (commit)
      from  0b4ad564482929d3f8eaefe8324df54bb276b74b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b434a3a88bffcf068b500c430d6a0db0c6923190
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Mar 4 11:59:57 2015 -0500

    5246: Use pkg_resources.parse_version to test urllib3 version string.  Identify
    Debian 8 specifically in comment.

diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index cbc51aa..0c7f467 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -32,18 +32,12 @@ try:
     # The 'requests' library enables urllib3's SNI support by default, which uses pyopenssl.
     # However, urllib3 prior to version 1.10 has a major bug in this feature
     # (OpenSSL WantWriteError, https://github.com/shazow/urllib3/issues/412)
-    # Unfortunately a certain major Linux distribution is stablizing on urllib3
-    # 1.9.1 which means the following workaround is necessary to be able to use
+    # Unfortunately Debian 8 is stabilizing on urllib3 1.9.1 which means the
+    # following workaround is necessary to be able to use
     # the arvados python sdk with the distribution-provided packages.
-
     import urllib3
-    urllib3_ok = False
-    urllib3version = re.match(r'(\d+)\.(\d+)\.(\d+)', urllib3.__version__)
-    if (urllib3version and
-        int(urllib3version.group(1)) == 1 and
-        int(urllib3version.group(2)) >= 10):
-        urllib3_ok = True
-    if not urllib3_ok:
+    from pkg_resources import parse_version
+    if parse_version(urllib3.__version__) < parse_version('1.10'):
         from urllib3.contrib import pyopenssl
         pyopenssl.extract_from_urllib3()
 except ImportError:

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list