Avro
  1. Avro
  2. AVRO-618

Avro doesn't work with python 2.4

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:
      None

      Description

      The avro tests fail on a system with python2.4. The issues can be easily worked around by avoiding python2.5 constructs and libraries.

      The missing "struct.Struct" is what started me down this path, but I also ended up tackling a few other similar issues and re-jiggering slightly the build.xml to allow for "ant test -Dpython=python2.4" to work.

        File "build/bdist.macosx-10.5-i386/egg/avro/io.py", line 52, in ?
      AttributeError: 'module' object has no attribute 'Struct'
      
      1. AVRO-618.patch.txt
        10 kB
        Philip Zeyliger

        Issue Links

          Activity

          Hide
          Philip Zeyliger added a comment -

          Committed as r987543.

          Show
          Philip Zeyliger added a comment - Committed as r987543.
          Hide
          Jeff Hammerbacher added a comment -

          If you prefer your implementation, go ahead and check it in.

          Show
          Jeff Hammerbacher added a comment - If you prefer your implementation, go ahead and check it in.
          Hide
          Philip Zeyliger added a comment -

          They're pretty close. I actually got rid of uuid completely, and just used the same mechanism that it uses to get a random 16 bytes, since there's no need to create the UUID object if all we're looking for is 16 random bytes.

          I think the code has moved a bit, so mine might apply more cleanly. Haven't tried applying 588.

          I've also updated the build.xml file to run arbitrary versions of python easily, so this is easier to reproduce.

          Show
          Philip Zeyliger added a comment - They're pretty close. I actually got rid of uuid completely, and just used the same mechanism that it uses to get a random 16 bytes, since there's no need to create the UUID object if all we're looking for is 16 random bytes. I think the code has moved a bit, so mine might apply more cleanly. Haven't tried applying 588. I've also updated the build.xml file to run arbitrary versions of python easily, so this is easier to reproduce.
          Hide
          Jeff Hammerbacher added a comment -

          I already did this at AVRO-588, just haven't had time to check it in. Did you do anything differently?

          Show
          Jeff Hammerbacher added a comment - I already did this at AVRO-588 , just haven't had time to check it in. Did you do anything differently?
          Hide
          Philip Zeyliger added a comment -

          Patch which fixes python2.4 issues. I tested with python2.4 and python2.5 on OS X 10.5.

          Show
          Philip Zeyliger added a comment - Patch which fixes python2.4 issues. I tested with python2.4 and python2.5 on OS X 10.5.

            People

            • Assignee:
              Philip Zeyliger
              Reporter:
              Philip Zeyliger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development