[ARVADOS] updated: f2c1db3480befa2c29a742313465e7cc9f2635b1

Git user git at public.curoverse.com
Fri Apr 14 15:33:36 EDT 2017


Summary of changes:
 build/build.list                                   |   8 +-
 build/rails-package-scripts/postinst.sh            |   4 +-
 build/run-build-packages-sso.sh                    |   3 +
 build/run-tests.sh                                 |   3 +
 doc/_includes/_navbar_top.liquid                   |   2 +-
 .../methods/container_requests.html.textile.liquid |   2 +
 .../install-nodemanager.html.textile.liquid        |  30 +++
 sdk/cli/test/test_arv-keep-get.rb                  |   4 +-
 sdk/cwl/arvados_cwl/arvcontainer.py                |   3 +-
 sdk/cwl/arvados_cwl/fsaccess.py                    |   5 +-
 sdk/cwl/arvados_cwl/pathmapper.py                  |  13 +-
 sdk/cwl/test_with_arvbox.sh                        |   2 +
 sdk/cwl/tests/arvados-tests.sh                     |   2 +-
 sdk/cwl/tests/arvados-tests.yml                    |  38 +++
 sdk/cwl/tests/cat.cwl                              |   8 +
 sdk/cwl/tests/dir-job2.yml                         |   3 +
 ...dir-test-input.cwl => keep-dir-test-input2.cwl} |   3 +
 ...dir-test-input.cwl => keep-dir-test-input3.cwl} |   3 +
 sdk/cwl/tests/octo.yml                             |   3 +
 .../cwl/tests/octothorpe/item #1.txt               |   0
 sdk/go/keepclient/support.go                       |  10 +
 sdk/python/arvados/__init__.py                     |   1 -
 sdk/python/arvados/api.py                          |   8 +-
 sdk/python/arvados/commands/get.py                 | 280 +++++++++++++++++++++
 sdk/python/arvados/commands/ls.py                  |  57 ++++-
 sdk/python/arvados/keep.py                         |  20 +-
 sdk/python/bin/arv-get                             | 235 +----------------
 sdk/python/setup.py                                |  12 +-
 sdk/python/tests/arvados_testutil.py               |   3 +-
 sdk/python/tests/run_test_server.py                |   1 -
 sdk/python/tests/test_arv_get.py                   | 106 ++++++++
 sdk/python/tests/test_arv_ls.py                    |  11 +-
 services/api/app/models/arvados_model.rb           |  53 ++--
 services/api/app/models/collection.rb              |  40 ++-
 services/api/app/models/container_request.rb       |  85 ++++---
 services/api/app/models/node.rb                    |  20 +-
 ...0012505_add_output_ttl_to_container_requests.rb |   5 +
 services/api/db/structure.sql                      |   7 +-
 services/api/test/unit/collection_test.rb          |  23 +-
 services/api/test/unit/container_request_test.rb   | 115 +++++++--
 services/api/test/unit/node_test.rb                |  12 +
 services/crunch-run/crunchrun.go                   | 138 ++++++++--
 services/crunch-run/crunchrun_test.go              | 136 +++++++++-
 services/fuse/arvados_fuse/command.py              |   5 +-
 services/fuse/arvados_fuse/unmount.py              |  18 +-
 services/fuse/tests/test_unmount.py                |  40 ++-
 .../arvnodeman/computenode/dispatch/__init__.py    |  10 +-
 .../arvnodeman/computenode/driver/__init__.py      |  17 ++
 .../arvnodeman/computenode/driver/gce.py           |  12 +-
 services/nodemanager/arvnodeman/config.py          |   2 +
 services/nodemanager/arvnodeman/daemon.py          |  19 +-
 services/nodemanager/arvnodeman/launcher.py        |   3 +
 services/nodemanager/arvnodeman/status.py          |  65 +++++
 services/nodemanager/doc/azure.example.cfg         |  10 +
 services/nodemanager/doc/ec2.example.cfg           |  10 +
 services/nodemanager/doc/gce.example.cfg           |  10 +
 services/nodemanager/doc/local.example.cfg         |   4 +
 services/nodemanager/setup.py                      |  22 +-
 .../tests/test_computenode_driver_gce.py           |  13 +-
 services/nodemanager/tests/test_daemon.py          |   8 +
 services/nodemanager/tests/test_failure.py         |   2 +-
 services/nodemanager/tests/test_status.py          |  55 ++++
 62 files changed, 1379 insertions(+), 463 deletions(-)
 create mode 100644 sdk/cwl/tests/cat.cwl
 create mode 100644 sdk/cwl/tests/dir-job2.yml
 copy sdk/cwl/tests/{keep-dir-test-input.cwl => keep-dir-test-input2.cwl} (77%)
 copy sdk/cwl/tests/{keep-dir-test-input.cwl => keep-dir-test-input3.cwl} (76%)
 create mode 100644 sdk/cwl/tests/octo.yml
 copy tools/crunchstat-summary/tests/__init__.py => sdk/cwl/tests/octothorpe/item #1.txt (100%)
 create mode 100755 sdk/python/arvados/commands/get.py
 create mode 100644 sdk/python/tests/test_arv_get.py
 create mode 100644 services/api/db/migrate/20170330012505_add_output_ttl_to_container_requests.rb
 create mode 100644 services/nodemanager/arvnodeman/status.py
 create mode 100644 services/nodemanager/tests/test_status.py

       via  f2c1db3480befa2c29a742313465e7cc9f2635b1 (commit)
       via  84737fbdeecd9d9707bef0dde8762d370fba02cb (commit)
       via  ebc9ff19a20c49da45f39379d148b6dc4ccec8e2 (commit)
       via  db7e17f830ac3707d7222d73c2f70f1d726a724c (commit)
       via  0c5cb575c6915778dc6b2de6348bdc32121434eb (commit)
       via  0b8673b62cd9717fcf7e3bbb608ae07018093d6f (commit)
       via  06e1c2317d969fb5872cf1f2c29adaac7e0ef251 (commit)
       via  1b290e512496287e389424f3950f660f83c1c59b (commit)
       via  c03283d4da26ac9a6551dd00b25882b14c258da3 (commit)
       via  e1bc430748edced07f43f6c8efd73bbf2d828ca0 (commit)
       via  a6be53f6913862b3884c57e9e93a891f3cfec471 (commit)
       via  95ef2a6f4145d8c6058738b6de0bce098e3423d6 (commit)
       via  8be16cfc7e163cc96995be891e53050febfb1fca (commit)
       via  2c094e28cc4f19df4f6d0bc81355e7fc19e8c493 (commit)
       via  a779382603d2da2ec38ceb8a21262cc4f151f077 (commit)
       via  26eb8f4cba5dd20ae49bf509a9a772ee4fe8b396 (commit)
       via  be2a34c57eab7cc184c08ec1059554cb97911276 (commit)
       via  533bf8f1120c0f3fd74a31dfda990cc832b2aa51 (commit)
       via  96b6e26749f3a7076b585758d44244777cc628c6 (commit)
       via  f08a738f1565b2dabde28dc9e8d1bad9622d5529 (commit)
       via  466e0e2623bb85870943f48fe1ab3016dc32d652 (commit)
       via  c1ea9a2fdccc5e24554f8cf28296cbc0764c8bbc (commit)
       via  f9a1468065776ee71eb43c45e6813bfae69fe0e0 (commit)
       via  2f46fb5769f41ac9cddf8c46bd0d2ab094375e82 (commit)
       via  909313b20ed5055d62113f0eea123f362869c3f4 (commit)
       via  4f68551a87ff2cb88c23a2942abe2676a33f7cbb (commit)
       via  e7876a3ac520b128be7836e30172079ab2af5e45 (commit)
       via  f49bc2790a18de14e22e69fb39f93805488fdbb3 (commit)
       via  ab9a73d2c0b567d3c05d1d4d8463633a69eafda2 (commit)
       via  3f5c2b95de8483e277a472846ad7e5b2ccb1f79a (commit)
       via  86a6e4fe9347570090d1d1471f98675c3fb758f4 (commit)
       via  157847615412907e87d24fb1767470d0157a4c30 (commit)
       via  1b226fee3268f50ef670289fc5931a00866d69cd (commit)
       via  4405570376295039b4c00577535a394eb011f8ad (commit)
       via  2f52a6e7d9945f51d33b047466c4d927d494bb32 (commit)
       via  0654fa160f872fe20ea4ada42a655f9d154c0833 (commit)
       via  330f544dd257a43640eefc64b825b868f6e5be21 (commit)
       via  351f06f68e8b079377bea195c67fed171b1e4b73 (commit)
       via  75184884ed798b474e8b9e254045dc0f4354379e (commit)
       via  2ebd44960d1e7a0431d6ad612298012627c5019c (commit)
       via  a869fa401696bc481380be239850ccf3edd808f6 (commit)
       via  9dae3e6dde2993bc44e90539141b442c899cf114 (commit)
       via  1c1c11c2c2d6cfd1d379cdbb166498514768be4e (commit)
       via  1d0d28c791e88f817b1c01560ee8efd70bcab41e (commit)
       via  3ceb42c882b32fb9e4ef79679576254f98cdfb3d (commit)
       via  e3c48eaab3bbf538a03e575aab09cef59ee69f18 (commit)
       via  ed46350a4b4cd947d126b5e1e9a0514aa0b93532 (commit)
       via  921d4321201be7542f9198202f75ba39c3f83d3f (commit)
       via  1affdcd3cd34424a817ae350fd9ca236927fd538 (commit)
       via  38fcd08dda022d0167840fbb65222fe99b75fcf5 (commit)
       via  33ec0939cd5853d1c14a621c551ac2705efd1cd7 (commit)
       via  b594678083d6cd7efe425bb4be63a444f22ce153 (commit)
       via  7b31dd40b31bdbf7473b50fd407cd6f636657c69 (commit)
       via  8fd18fc4a32797fc3c6255099fc253d7aede12b5 (commit)
       via  ae69864e07d416d10879e00da416918ac021893f (commit)
       via  7ce46899b5ed250aa909fa240b6be3e01637fb79 (commit)
       via  b50a3bcb38cf9e79416d8cc9b0d8b66249b3d473 (commit)
       via  c3ae1e2f54d4199a9521bf3d4d515bcbb0711989 (commit)
       via  6da9f3666bc0ddee2d0be079cc30ba8b82804706 (commit)
       via  dfd3260e8b32ac4b9640e3e33bf8cf1e581bd917 (commit)
       via  42e6998c32f8d5553133e4b0b3ea02cd0c6f5554 (commit)
       via  4bb024ae6903552c29613c851312f934dc6174b9 (commit)
       via  a03ce4056e503710caa1e95d315b92fb74c96abf (commit)
       via  77f5a84ccc2b14438286ed05c6af183b8d8be605 (commit)
       via  4a35e06b098bdd44a24fcaf77921aea5f371c84b (commit)
       via  313415e33ca374898a371b9f22fc6546793f4688 (commit)
       via  2c0c6e6ba25ec56bab8c224865a7979af577adaa (commit)
       via  07c92074fe2b493dc8cd0abdad154e5b36d4adfc (commit)
       via  1654f776b55bbb861f72c0dd3118ad1beec5db31 (commit)
       via  988e9052575bc93db2909f3b9ef576f1043eddcb (commit)
       via  3cc77494ac02e0f64a814cd4a898662fb7b329af (commit)
       via  ff3bb22d4b2bff5666907a6eeb6cd68cd3cbe22b (commit)
       via  b651984ff68c6f8add9b99427b205a2cb7c87462 (commit)
       via  c820bfc91be7635739bad0857ba3a385d1334b6a (commit)
       via  fb1c8e81a200c11b1130f3a9af586f1bbf8c19b3 (commit)
       via  65121f8db54a1ed15207d050e1f48c5fc26d646b (commit)
       via  4437774e863465c0daa41dfd9716174e18d93122 (commit)
       via  a12ed889f9d0106ea26d0e2d6ff1f74e9ab14aac (commit)
       via  c507b0b072ad62c0087d059aedeaae8bae9b715f (commit)
       via  0568c2d42703a7b839f2661968c05a23753f67c3 (commit)
       via  154ae0d4b13329bae1033ab99095c00d0b0f66e2 (commit)
       via  ae7f5a9c869927336dc81cf0552b955457a09647 (commit)
       via  4afa501317cc04596377bcff8a7b2fccf7ab8d8d (commit)
      from  f6b16b5ae75469167dbea08d69692d5f53dd9c84 (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 f2c1db3480befa2c29a742313465e7cc9f2635b1
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Apr 14 14:45:01 2017 -0400

    11308: Fix bytes vs. strings in arv-get command and tests.

diff --git a/sdk/python/arvados/commands/get.py b/sdk/python/arvados/commands/get.py
index 57e48e0..48f076b 100755
--- a/sdk/python/arvados/commands/get.py
+++ b/sdk/python/arvados/commands/get.py
@@ -126,6 +126,10 @@ def parse_arguments(arguments, stdout, stderr):
 def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
     global api_client
 
+    if stdout is sys.stdout and hasattr(stdout, 'buffer'):
+        # in Python 3, write to stdout as binary
+        stdout = stdout.buffer
+
     args = parse_arguments(arguments, stdout, stderr)
     if api_client is None:
         api_client = arvados.api('v1')
@@ -149,11 +153,11 @@ def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
                 open_flags |= os.O_EXCL
             try:
                 if args.destination == "-":
-                    stdout.write(reader.manifest_text())
+                    stdout.write(reader.manifest_text().encode())
                 else:
                     out_fd = os.open(args.destination, open_flags)
                     with os.fdopen(out_fd, 'wb') as out_file:
-                        out_file.write(reader.manifest_text())
+                        out_file.write(reader.manifest_text().encode())
             except (IOError, OSError) as error:
                 logger.error("can't write to '{}': {}".format(args.destination, error))
                 return 1
@@ -230,7 +234,7 @@ def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
         if args.hash:
             digestor = hashlib.new(args.hash)
         try:
-            with s.open(f.name, 'r') as file_reader:
+            with s.open(f.name, 'rb') as file_reader:
                 for data in file_reader.readall():
                     if outfile:
                         outfile.write(data)
diff --git a/sdk/python/bin/arv-get b/sdk/python/bin/arv-get
index 1c2e552..2f30269 100755
--- a/sdk/python/bin/arv-get
+++ b/sdk/python/bin/arv-get
@@ -4,4 +4,4 @@ import sys
 
 from arvados.commands.get import main
 
-sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr))
+sys.exit(main(sys.argv[1:]))
diff --git a/sdk/python/tests/arvados_testutil.py b/sdk/python/tests/arvados_testutil.py
index ebf6297..f37405d 100644
--- a/sdk/python/tests/arvados_testutil.py
+++ b/sdk/python/tests/arvados_testutil.py
@@ -20,9 +20,10 @@ import tempfile
 import unittest
 
 if sys.version_info >= (3, 0):
-    from io import StringIO
+    from io import StringIO, BytesIO
 else:
     from cStringIO import StringIO
+    BytesIO = StringIO
 
 # Use this hostname when you want to make sure the traffic will be
 # instantly refused.  100::/64 is a dedicated black hole.
diff --git a/sdk/python/tests/test_arv_get.py b/sdk/python/tests/test_arv_get.py
index 4903639..46c1a0e 100644
--- a/sdk/python/tests/test_arv_get.py
+++ b/sdk/python/tests/test_arv_get.py
@@ -9,9 +9,10 @@ import arvados.collection as collection
 import arvados.commands.get as arv_get
 from . import run_test_server
 
-from .arvados_testutil import redirected_streams
+from . import arvados_testutil as tutil
 
-class ArvadosGetTestCase(run_test_server.TestCaseWithServers):
+class ArvadosGetTestCase(run_test_server.TestCaseWithServers,
+                         tutil.VersionChecker):
     MAIN_SERVER = {}
     KEEP_SERVER = {}
 
@@ -32,34 +33,32 @@ class ArvadosGetTestCase(run_test_server.TestCaseWithServers):
                               }):
         c = collection.Collection()
         for path, data in listitems(contents):
-            with c.open(path, 'w') as f:
+            with c.open(path, 'wb') as f:
                 f.write(data)
         c.save_new()
         return (c.manifest_locator(), c.portable_data_hash(), c.manifest_text())
 
     def run_get(self, args):
-        self.stdout = io.BytesIO()
-        self.stderr = io.BytesIO()
+        self.stdout = tutil.BytesIO()
+        self.stderr = tutil.StringIO()
         return arv_get.main(args, self.stdout, self.stderr)
 
     def test_version_argument(self):
-        err = io.BytesIO()
-        out = io.BytesIO()
-        with redirected_streams(stdout=out, stderr=err):
+        with tutil.redirected_streams(
+                stdout=tutil.StringIO, stderr=tutil.StringIO) as (out, err):
             with self.assertRaises(SystemExit):
                 self.run_get(['--version'])
-        self.assertEqual(out.getvalue(), '')
-        self.assertRegexpMatches(err.getvalue(), "[0-9]+\.[0-9]+\.[0-9]+")
+        self.assertVersionOutput(out, err)
 
     def test_get_single_file(self):
         # Get the file using the collection's locator
         r = self.run_get(["{}/subdir/baz.txt".format(self.col_loc), '-'])
         self.assertEqual(0, r)
-        self.assertEqual('baz', self.stdout.getvalue())
+        self.assertEqual(b'baz', self.stdout.getvalue())
         # Then, try by PDH
         r = self.run_get(["{}/subdir/baz.txt".format(self.col_pdh), '-'])
         self.assertEqual(0, r)
-        self.assertEqual('baz', self.stdout.getvalue())
+        self.assertEqual(b'baz', self.stdout.getvalue())
 
     def test_get_multiple_files(self):
         # Download the entire collection to the temp directory

commit 84737fbdeecd9d9707bef0dde8762d370fba02cb
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Apr 14 14:44:23 2017 -0400

    11308: Remove unused import.

diff --git a/sdk/python/arvados/__init__.py b/sdk/python/arvados/__init__.py
index b2873ec..fa7e253 100644
--- a/sdk/python/arvados/__init__.py
+++ b/sdk/python/arvados/__init__.py
@@ -5,7 +5,6 @@ standard_library.install_aliases()
 from builtins import object
 import bz2
 import fcntl
-import gflags
 import hashlib
 import http.client
 import httplib2

commit ebc9ff19a20c49da45f39379d148b6dc4ccec8e2
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Apr 14 13:52:57 2017 -0400

    11308: Futurize test_arv_get.py and commands/get.py

diff --git a/sdk/python/arvados/commands/get.py b/sdk/python/arvados/commands/get.py
index 72d099d..57e48e0 100755
--- a/sdk/python/arvados/commands/get.py
+++ b/sdk/python/arvados/commands/get.py
@@ -265,7 +265,7 @@ def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
 
 def files_in_collection(c):
     # Sort first by file type, then alphabetically by file path.
-    for i in sorted(c.keys(),
+    for i in sorted(list(c.keys()),
                     key=lambda k: (
                         isinstance(c[k], arvados.collection.Subcollection),
                         k.upper())):
diff --git a/sdk/python/tests/test_arv_get.py b/sdk/python/tests/test_arv_get.py
index d892317..4903639 100644
--- a/sdk/python/tests/test_arv_get.py
+++ b/sdk/python/tests/test_arv_get.py
@@ -1,6 +1,5 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
+from __future__ import absolute_import
+from future.utils import listitems
 import io
 import shutil
 import tempfile
@@ -8,9 +7,9 @@ import tempfile
 import arvados
 import arvados.collection as collection
 import arvados.commands.get as arv_get
-import run_test_server
+from . import run_test_server
 
-from arvados_testutil import redirected_streams
+from .arvados_testutil import redirected_streams
 
 class ArvadosGetTestCase(run_test_server.TestCaseWithServers):
     MAIN_SERVER = {}
@@ -32,7 +31,7 @@ class ArvadosGetTestCase(run_test_server.TestCaseWithServers):
                                   'subdir/baz.txt' : 'baz',
                               }):
         c = collection.Collection()
-        for path, data in contents.items():
+        for path, data in listitems(contents):
             with c.open(path, 'w') as f:
                 f.write(data)
         c.save_new()

commit db7e17f830ac3707d7222d73c2f70f1d726a724c
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Apr 14 13:43:10 2017 -0400

    11308: Fix whitespace

diff --git a/sdk/python/arvados/commands/get.py b/sdk/python/arvados/commands/get.py
index f39e092..72d099d 100755
--- a/sdk/python/arvados/commands/get.py
+++ b/sdk/python/arvados/commands/get.py
@@ -125,7 +125,7 @@ def parse_arguments(arguments, stdout, stderr):
 
 def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
     global api_client
-    
+
     args = parse_arguments(arguments, stdout, stderr)
     if api_client is None:
         api_client = arvados.api('v1')
diff --git a/sdk/python/tests/test_arv_get.py b/sdk/python/tests/test_arv_get.py
index 907c671..d892317 100644
--- a/sdk/python/tests/test_arv_get.py
+++ b/sdk/python/tests/test_arv_get.py
@@ -37,7 +37,7 @@ class ArvadosGetTestCase(run_test_server.TestCaseWithServers):
                 f.write(data)
         c.save_new()
         return (c.manifest_locator(), c.portable_data_hash(), c.manifest_text())
-    
+
     def run_get(self, args):
         self.stdout = io.BytesIO()
         self.stderr = io.BytesIO()
@@ -60,7 +60,7 @@ class ArvadosGetTestCase(run_test_server.TestCaseWithServers):
         # Then, try by PDH
         r = self.run_get(["{}/subdir/baz.txt".format(self.col_pdh), '-'])
         self.assertEqual(0, r)
-        self.assertEqual('baz', self.stdout.getvalue())        
+        self.assertEqual('baz', self.stdout.getvalue())
 
     def test_get_multiple_files(self):
         # Download the entire collection to the temp directory

commit 0c5cb575c6915778dc6b2de6348bdc32121434eb
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Apr 14 13:52:26 2017 -0400

    11308: Restore dependency lost in merge.

diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index a07155e..a3d1661 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -45,13 +45,14 @@ setup(name='arvados-python-client',
           ('share/doc/arvados-python-client', ['LICENSE-2.0.txt', 'README.rst']),
       ],
       install_requires=[
-          'google-api-python-client >=1.6.2, <1.7',
           'ciso8601',
+          'future',
+          'google-api-python-client >=1.6.2, <1.7',
           'httplib2 >=0.9.2',
           'pycurl >=7.19.5.1',
+          'ruamel.yaml >=0.13.7',
           'setuptools',
           'ws4py <0.4',
-          'ruamel.yaml >=0.13.7'
       ],
       test_suite='tests',
       tests_require=['pbr<1.7.0', 'mock>=1.0', 'PyYAML'],

commit 0b8673b62cd9717fcf7e3bbb608ae07018093d6f
Merge: 06e1c23 1b290e5
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Apr 12 15:01:07 2017 -0400

    11308: Merge branch 'master' into 11308-python3
    
    Conflicts:
    	sdk/python/arvados/__init__.py
    	sdk/python/arvados/api.py
    	sdk/python/arvados/commands/ls.py
    	sdk/python/arvados/keep.py
    	sdk/python/setup.py
    	sdk/python/tests/test_arv_ls.py

diff --cc sdk/python/arvados/api.py
index a06170d,543725b..6581a8e
--- a/sdk/python/arvados/api.py
+++ b/sdk/python/arvados/api.py
@@@ -79,8 -75,8 +79,8 @@@ def _intercept_http_request(self, uri, 
      for _ in range(retry_count):
          self._last_request_time = time.time()
          try:
-             return self.orig_http_request(uri, **kwargs)
+             return self.orig_http_request(uri, method, **kwargs)
 -        except httplib.HTTPException:
 +        except http.client.HTTPException:
              _logger.debug("Retrying API request in %d s after HTTP error",
                            delay, exc_info=True)
          except socket.error:
diff --cc sdk/python/arvados/commands/ls.py
index 250bda8,c6ca085..3e3f671
mode 100644,100755..100644
--- a/sdk/python/arvados/commands/ls.py
+++ b/sdk/python/arvados/commands/ls.py
@@@ -1,7 -1,11 +1,10 @@@
 -#!/usr/bin/env python
 -
  from __future__ import print_function
 +from __future__ import division
  
  import argparse
+ import collections
+ import logging
+ import re
  import sys
  
  import arvados
@@@ -25,12 -31,12 +30,12 @@@ def parse_args(args)
      return parser.parse_args(args)
  
  def size_formatter(coll_file):
-     return "{:>10}".format((coll_file.size() + 1023) // 1024)
 -    return "{:>10}".format((coll_file.size + 1023) / 1024)
++    return "{:>10}".format((coll_file.size + 1023) // 1024)
  
  def name_formatter(coll_file):
-     return "{}/{}".format(coll_file.stream_name(), coll_file.name)
+     return "{}/{}".format(coll_file.stream_name, coll_file.name)
  
- def main(args, stdout, stderr, api_client=None):
+ def main(args, stdout, stderr, api_client=None, logger=None):
      args = parse_args(args)
  
      if api_client is None:
diff --cc sdk/python/arvados/keep.py
index ce34e18,5b4770c..b0413eb
--- a/sdk/python/arvados/keep.py
+++ b/sdk/python/arvados/keep.py
@@@ -1,14 -1,7 +1,15 @@@
 -import cStringIO
 +from __future__ import absolute_import
 +from __future__ import division
 +from future import standard_library
 +standard_library.install_aliases()
 +from builtins import next
 +from builtins import str
 +from builtins import range
 +from builtins import object
- import io
+ import collections
  import datetime
  import hashlib
++import io
  import logging
  import math
  import os
diff --cc sdk/python/setup.py
index 9380a03,5387b02..a07155e
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@@ -45,16 -45,13 +45,13 @@@ setup(name='arvados-python-client'
            ('share/doc/arvados-python-client', ['LICENSE-2.0.txt', 'README.rst']),
        ],
        install_requires=[
-           'google-api-python-client==1.4.2',
-           'oauth2client >=1.4.6, <2',
 -          'google-api-python-client==1.6.2, <1.7',
++          'google-api-python-client >=1.6.2, <1.7',
            'ciso8601',
-           'httplib2',
-           'pycurl >=7.19.5.1, <7.21.5',
-           'python-gflags >=3',
 -          'httplib2 >= 0.9.2',
++          'httplib2 >=0.9.2',
+           'pycurl >=7.19.5.1',
            'setuptools',
 -          'ws4py<0.4',
 -          'ruamel.yaml>=0.13.7'
 +          'ws4py <0.4',
-           'ruamel.yaml >=0.13.7',
-           'future',
++          'ruamel.yaml >=0.13.7'
        ],
        test_suite='tests',
        tests_require=['pbr<1.7.0', 'mock>=1.0', 'PyYAML'],
diff --cc sdk/python/tests/test_arv_ls.py
index a7117d3,99b5510..e3f6c12
--- a/sdk/python/tests/test_arv_ls.py
+++ b/sdk/python/tests/test_arv_ls.py
@@@ -35,10 -35,10 +35,10 @@@ class ArvLsTestCase(run_test_server.Tes
          api_client.collections().get().execute.return_value = coll_info
          return coll_info, api_client
  
-     def run_ls(self, args, api_client):
+     def run_ls(self, args, api_client, logger=None):
 -        self.stdout = io.BytesIO()
 -        self.stderr = io.BytesIO()
 +        self.stdout = StringIO()
 +        self.stderr = StringIO()
-         return arv_ls.main(args, self.stdout, self.stderr, api_client)
+         return arv_ls.main(args, self.stdout, self.stderr, api_client, logger)
  
      def test_plain_listing(self):
          collection, api_client = self.mock_api_for_manifest(
@@@ -76,13 -76,19 +76,16 @@@
  
      def test_locator_failure(self):
          api_client = mock.MagicMock(name='mock_api_client')
+         error_mock = mock.MagicMock()
+         logger = mock.MagicMock()
+         logger.error = error_mock
          api_client.collections().get().execute.side_effect = (
              arv_error.NotFoundError)
-         self.assertNotEqual(0, self.run_ls([self.FAKE_UUID], api_client))
-         self.assertNotEqual('', self.stderr.getvalue())
+         self.assertNotEqual(0, self.run_ls([self.FAKE_UUID], api_client, logger))
+         self.assertEqual(1, error_mock.call_count)
  
      def test_version_argument(self):
 -        err = io.BytesIO()
 -        out = io.BytesIO()
 -        with redirected_streams(stdout=out, stderr=err):
 +        with redirected_streams(stdout=StringIO, stderr=StringIO) as (out, err):
              with self.assertRaises(SystemExit):
                  self.run_ls(['--version'], None)
 -        self.assertEqual(out.getvalue(), '')
 -        self.assertRegexpMatches(err.getvalue(), "[0-9]+\.[0-9]+\.[0-9]+")
 +        self.assertVersionOutput(out, err)

commit 06e1c2317d969fb5872cf1f2c29adaac7e0ef251
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Apr 12 12:02:14 2017 -0400

    11308: Remove unused import.

diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index 6d9ac06..5aff52b 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -1,6 +1,5 @@
 from __future__ import print_function
 from __future__ import division
-from future.utils import viewkeys
 from builtins import str
 from builtins import range
 import argparse

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list