Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-877

zkpython does not work with python3.1

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.4.6, 3.5.0
    • Component/s: contrib-bindings
    • Labels:
      None
    • Environment:

      linux+python3.1

    • Hadoop Flags:
      Reviewed

      Description

      as written in the contrib/zkpython/README file:

      "Python >= 2.6 is required. We have tested against 2.6. We have not tested against 3.x."

      this is probably more a 'new feature' request than a bug; anyway compiling the pythn module and calling it returns an error at load time:

      python3.1
      Python 3.1.2 (r312:79147, May 8 2010, 16:36:46)
      [GCC 4.4.4] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import zookeeper
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      ImportError: /usr/local/lib/python3.1/dist-packages/zookeeper.so: undefined symbol: PyString_AsString

      are there any plan to support Python3.X?

      I also tried to write a 3.1 ctypes wrapper but the C API seems in fact to be written in C++, so python ctypes cannot be used.

        Attachments

        1. ZOOKEEPER-877.patch
          8 kB
          Daniel Enman
        2. zookeeper.rst
          25 kB
          TuxRacer
        3. Doc.tgz
          9 kB
          TuxRacer
        4. zookeeper.c.patch.v2
          3 kB
          TuxRacer
        5. zookeeper.c.v2
          50 kB
          TuxRacer
        6. tests_py3k.tgz
          7 kB
          TuxRacer
        7. zookeeper.c
          49 kB
          TuxRacer
        8. zookeeper.c.patch.v1
          3 kB
          TuxRacer

          Activity

            People

            • Assignee:
              enmand Daniel Enman
              Reporter:
              tuxracer69 TuxRacer
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: