[ARVADOS] updated: 6c9dde5e6089efc8a87022ab9771da96932516a7

git at public.curoverse.com git at public.curoverse.com
Thu Apr 30 09:55:17 EDT 2015


Summary of changes:
 sdk/python/arvados/keep.py           | 4 ++--
 sdk/python/setup.py                  | 2 +-
 sdk/python/tests/arvados_testutil.py | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

       via  6c9dde5e6089efc8a87022ab9771da96932516a7 (commit)
      from  acc7d4a40ae78e866c983624ec36b7bae3b918a9 (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 6c9dde5e6089efc8a87022ab9771da96932516a7
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Apr 30 09:53:15 2015 -0400

    5562: Use WRITEFUNCTION instead of WRITEDATA for compatibility with older pycurl. refs #5562

diff --git a/sdk/python/arvados/keep.py b/sdk/python/arvados/keep.py
index 4bb0f50..5caa572 100644
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@ -362,7 +362,7 @@ class KeepClient(object):
                     curl.setopt(pycurl.URL, url.encode('utf-8'))
                     curl.setopt(pycurl.HTTPHEADER, [
                         '{}: {}'.format(k,v) for k,v in self.get_headers.iteritems()])
-                    curl.setopt(pycurl.WRITEDATA, response_body)
+                    curl.setopt(pycurl.WRITEFUNCTION, response_body.write)
                     curl.setopt(pycurl.HEADERFUNCTION, self._headerfunction)
                     self._setcurltimeouts(curl, timeout)
                     try:
@@ -427,7 +427,7 @@ class KeepClient(object):
                 curl.setopt(pycurl.CUSTOMREQUEST, 'PUT')
                 curl.setopt(pycurl.HTTPHEADER, [
                     '{}: {}'.format(k,v) for k,v in self.put_headers.iteritems()])
-                curl.setopt(pycurl.WRITEDATA, response_body)
+                curl.setopt(pycurl.WRITEFUNCTION, response_body.write)
                 curl.setopt(pycurl.HEADERFUNCTION, self._headerfunction)
                 self._setcurltimeouts(curl, timeout)
                 try:
diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index f27c28d..571faf1 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -38,7 +38,7 @@ setup(name='arvados-python-client',
       install_requires=[
           'google-api-python-client',
           'httplib2',
-          'pycurl',
+          'pycurl>=7.19',
           'python-gflags',
           'requests>=2.4',
           'urllib3',
diff --git a/sdk/python/tests/arvados_testutil.py b/sdk/python/tests/arvados_testutil.py
index b4e97f6..d138e59 100644
--- a/sdk/python/tests/arvados_testutil.py
+++ b/sdk/python/tests/arvados_testutil.py
@@ -63,7 +63,7 @@ class FakeCurl:
 
     def setopt(self, opt, val):
         self._opt[str(opt)] = val
-        if opt == pycurl.WRITEDATA:
+        if opt == pycurl.WRITEFUNCTION:
             self._writer = val
         elif opt == pycurl.HEADERFUNCTION:
             self._headerfunction = val
@@ -79,7 +79,7 @@ class FakeCurl:
             self._headerfunction("HTTP/1.1 {} Status".format(self._resp_code))
             for k, v in self._resp_headers.iteritems():
                 self._headerfunction(k + ': ' + str(v))
-        self._writer.write(self._resp_body)
+        self._writer(self._resp_body)
 
     def close(self):
         pass

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list