Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-1456

Kudu python module should not require unittest2

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.9.0
    • Component/s: python
    • Labels:
      None

      Description

      Trying to use the python client on centos 6 fails if unittest2 isn't installed

      ...          from kudu import connect as kudu_connect
      23:22:04   File "/data/jenkins/workspace/impala-external-gerrit-verify-merge/repos/Impala/infra/python/env/lib/python2.6/site-packages/kudu/__init__.py", line 18, in <module>
      23:22:04     from kudu.client import (Client, Table, Scanner, Session,  # noqa
      23:22:04   File "kudu/schema.pxd", line 24, in init kudu.client (kudu/client.cpp:18830)
      23:22:04     cdef class KuduType(object):
      23:22:04   File "kudu/schema.pyx", line 23, in init kudu.schema (kudu/schema.cpp:8622)
      23:22:04     from kudu.compat import tobytes, frombytes
      23:22:04   File "/data/jenkins/workspace/impala-external-gerrit-verify-merge/repos/Impala/infra/python/env/lib/python2.6/site-packages/kudu/compat.py", line 34, in <module>
      23:22:04     import unittest2 as unittest
      23:22:04 ImportError: No module named unittest2
      

      compat.py:

      if PY26:
          import unittest2 as unittest
      else:
          import unittest
      

      Any testing-only modules shouldn't be required. Moving them to something like "test_compat.py" would be nice.

        Attachments

          Activity

            People

            • Assignee:
              tlipcon Todd Lipcon
              Reporter:
              caseyching Casey Ching
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: