Uploaded image for project: 'Avro'
  1. Avro
  2. AVRO-1788

python api differs unnecessarily between python2 and python3

    Details

    • Type: Wish
    • Status: Patch Available
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: python
    • Labels:
      None

      Description

      It is difficult to use the python avro module in projects that maintain simultaneous compatibility between python 2 and python 3, because there are small differences in the API between the two versions in the module that seem unnecessary.

      For example, to parse a schema string in python 2:

      from avro.schema import parse
      

      and in python 3:

      from avro.schema import Parse
      

      In Python2, DatumReader's constructor has keyword argument "writers_schema", and in Python 3 it becomes "writer_schema" (no s).

      Would it be possible to align method names and arguments across the two modules?

        Issue Links

          Activity

          Hide
          thieman Travis Thieman added a comment -

          +1. This is a major issue for trying to write anything that can support Avro in both Python 2 and 3. Additionally, the Python 3 code is not idiomatic at all according to PEP-8. In the original poster's example, function names should always be lowercase. https://www.python.org/dev/peps/pep-0008/#function-names

          Show
          thieman Travis Thieman added a comment - +1. This is a major issue for trying to write anything that can support Avro in both Python 2 and 3. Additionally, the Python 3 code is not idiomatic at all according to PEP-8. In the original poster's example, function names should always be lowercase. https://www.python.org/dev/peps/pep-0008/#function-names
          Hide
          thieman Travis Thieman added a comment -

          I couldn't find a way to edit my comment but I'd also advocate changing this from Wish to Bug, this isn't a styling problem, it's actively preventing other people from writing any code using Avro which is compatible with both major Python versions.

          Show
          thieman Travis Thieman added a comment - I couldn't find a way to edit my comment but I'd also advocate changing this from Wish to Bug, this isn't a styling problem, it's actively preventing other people from writing any code using Avro which is compatible with both major Python versions.
          Hide
          saamuel Samuel Taylor added a comment -

          This is an issue. I'm happy to work on this if someone can point me in the right direction!

          Show
          saamuel Samuel Taylor added a comment - This is an issue. I'm happy to work on this if someone can point me in the right direction!
          Hide
          sacharya Suraj Acharya added a comment -

          To make it consistent you will need to change the way the fuction is called. Make it parse.
          py2 and py3.

          Do note you will need to see to it any reference made in the tests or in the other classes also changes. I would recommend a IDE.

          For writers_schema this is the offending line py2. Again make sure to change all the places from where it is referenced.

          Show
          sacharya Suraj Acharya added a comment - To make it consistent you will need to change the way the fuction is called. Make it parse . py2 and py3 . Do note you will need to see to it any reference made in the tests or in the other classes also changes. I would recommend a IDE. For writers_schema this is the offending line py2 . Again make sure to change all the places from where it is referenced.
          Hide
          ahasha@gmail.com Alexander Hasha added a comment -

          For reference, here is what I was working on when I submitted the issue. This commit shows changes I had to make to make a python app using `avro` Python 2 and 3 compatible.

          https://github.com/blaze/odo/pull/386/commits/ee5e6f384fb809decbcf709aaf74df072a99d067

          Show
          ahasha@gmail.com Alexander Hasha added a comment - For reference, here is what I was working on when I submitted the issue. This commit shows changes I had to make to make a python app using `avro` Python 2 and 3 compatible. https://github.com/blaze/odo/pull/386/commits/ee5e6f384fb809decbcf709aaf74df072a99d067
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user ssaamm opened a pull request:

          https://github.com/apache/avro/pull/133

          AVRO-1788: Implement Python 2 API

          The Python 2 API and the Python 3 API differ unnecessarily, making it more difficult to write code that supports both major Python versions. Additionally, a lot of these function names were non-Pythonic.

          This contribution is my original work, and I license the work to the project under the project's open source license.

          Tests pass:

          ```
          /Users/sam/dev/avro/lang/py3/env/lib/python3.5/site-packages/setuptools/dist.py:294: UserWarning: The version specified ('1.9.0-SNAPSHOT') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
          "details." % self.metadata.version
          testCsv (avro.tests.test_script.TestCat) ... ok
          testCsvHeader (avro.tests.test_script.TestCat) ... ok
          testFields (avro.tests.test_script.TestCat) ... ok
          testFiles (avro.tests.test_script.TestCat) ... ok
          testFilter (avro.tests.test_script.TestCat) ... ok
          testHelp (avro.tests.test_script.TestCat) ... ok
          testJsonPretty (avro.tests.test_script.TestCat) ... ok
          testPrint (avro.tests.test_script.TestCat) ... ok
          testPrintSchema (avro.tests.test_script.TestCat) ... ok
          testSkip (avro.tests.test_script.TestCat) ... ok
          testVersion (avro.tests.test_script.TestCat) ... ok
          testAppend (avro.tests.test_datafile.TestDataFile) ... ok
          testContextManager (avro.tests.test_datafile.TestDataFile) ... ok
          testMetadata (avro.tests.test_datafile.TestDataFile) ... ok
          testRoundTrip (avro.tests.test_datafile.TestDataFile) ... ok
          testInterop (avro.tests.test_datafile_interop.TestDataFileInterop) ... ok
          testSymbolsInOrder (avro.tests.test_enum.TestEnum) ... ok
          testSymbolsInReverseOrder (avro.tests.test_enum.TestEnum) ... ok
          testBinaryIntEncoding (avro.tests.test_io.TestIO) ... ok
          testBinaryLongEncoding (avro.tests.test_io.TestIO) ... ok
          testDefaultValue (avro.tests.test_io.TestIO) ... ok
          testFieldOrder (avro.tests.test_io.TestIO) ... ok
          testNoDefaultValue (avro.tests.test_io.TestIO) ... ok
          testProjection (avro.tests.test_io.TestIO) ... ok
          testRoundTrip (avro.tests.test_io.TestIO) ... ok
          testSchemaPromotion (avro.tests.test_io.TestIO) ... ok
          testSkipInt (avro.tests.test_io.TestIO) ... ok
          testSkipLong (avro.tests.test_io.TestIO) ... ok
          testTypeException (avro.tests.test_io.TestIO) ... ok
          testUnknownSymbol (avro.tests.test_io.TestIO) ... ok
          testValidate (avro.tests.test_io.TestIO) ... ok
          testEchoService (avro.tests.test_ipc.TestIPC)
          Tests client-side of the Echo service. ... 2016-09-27 18:14:00,348 INFO test_ipc.py:118 : Echo RPC Server listening on 127.0.0.1:57632
          2016-09-27 18:14:00,348 INFO test_ipc.py:119 : RPC socket: <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 57632)>
          2016-09-27 18:14:00,349 INFO ipc.py:179 : Sending handshake request:

          {'serverHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2', 'clientHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2'}

          2016-09-27 18:14:00,350 INFO ipc.py:204 : writing request: {'ping': {'text': 'hello ping', 'timestamp': 31415}}
          2016-09-27 18:14:00,350 INFO ipc.py:654 : Serialized request: b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2\x00\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2\x00\x00\x08ping\xee\xea\x03\x14hello ping'
          2016-09-27 18:14:00,351 INFO ipc.py:412 : Processing handshake request:

          {'serverHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2', 'clientProtocol': None, 'meta': None, 'clientHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2'}

          2016-09-27 18:14:00,351 INFO ipc.py:441 : Handshake response:

          {'match': 'BOTH'}

          2016-09-27 18:14:00,351 INFO ipc.py:375 : Processing request: {'ping': {'text': 'hello ping', 'timestamp': 31415}}
          2016-09-27 18:14:00,351 INFO test_ipc.py:90 : Message: {"response": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Pong", "fields": [

          {"type": "long", "name": "timestamp", "default": -1}

          ,

          {"type": "org.apache.avro.ipc.echo.Ping", "name": "ping"}

          ]}, "errors": [], "request": [{"type": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Ping", "fields": [

          {"type": "long", "name": "timestamp", "default": -1}

          ,

          {"type": "string", "name": "text", "default": ""}

          ]}, "name": "ping"}]}
          2016-09-27 18:14:00,351 INFO test_ipc.py:91 : Request: {'ping': {'text': 'hello ping', 'timestamp': 31415}}
          2016-09-27 18:14:00,352 INFO ipc.py:656 : Serialized response: b'\x00\x00\x00\x00\x00\x00\xbe\x90\xe9\xde\xedU\xee\xea\x03\x14hello ping'
          127.0.0.1 - - [27/Sep/2016 18:14:00] "POST / HTTP/1.1" 200 -
          2016-09-27 18:14:00,352 INFO ipc.py:665 : Response sent
          2016-09-27 18:14:00,353 INFO ipc.py:219 : Processing handshake response:

          {'serverHash': None, 'match': 'BOTH', 'meta': None, 'serverProtocol': None}

          2016-09-27 18:14:00,353 INFO test_ipc.py:143 : Received echo response: {'timestamp': 1475018040351, 'ping': {'text': 'hello ping', 'timestamp': 31415}}
          2016-09-27 18:14:00,353 INFO ipc.py:179 : Sending handshake request:

          {'serverHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2', 'clientHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2'}

          2016-09-27 18:14:00,353 INFO ipc.py:204 : writing request: {'ping': {'text': 'hello again', 'timestamp': 123456}}
          2016-09-27 18:14:00,354 INFO ipc.py:654 : Serialized request: b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2\x00\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2\x00\x00\x08ping\x80\x89\x0f\x16hello again'
          2016-09-27 18:14:00,354 INFO ipc.py:412 : Processing handshake request:

          {'serverHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2', 'clientProtocol': None, 'meta': None, 'clientHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2'}

          2016-09-27 18:14:00,355 INFO ipc.py:441 : Handshake response:

          {'match': 'BOTH'}

          2016-09-27 18:14:00,355 INFO ipc.py:375 : Processing request: {'ping': {'text': 'hello again', 'timestamp': 123456}}
          2016-09-27 18:14:00,355 INFO test_ipc.py:90 : Message: {"response": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Pong", "fields": [

          {"type": "long", "name": "timestamp", "default": -1}

          ,

          {"type": "org.apache.avro.ipc.echo.Ping", "name": "ping"}

          ]}, "errors": [], "request": [{"type": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Ping", "fields": [

          {"type": "long", "name": "timestamp", "default": -1}

          ,

          {"type": "string", "name": "text", "default": ""}

          ]}, "name": "ping"}]}
          2016-09-27 18:14:00,355 INFO test_ipc.py:91 : Request: {'ping': {'text': 'hello again', 'timestamp': 123456}}
          2016-09-27 18:14:00,355 INFO ipc.py:656 : Serialized response: b'\x00\x00\x00\x00\x00\x00\xc6\x90\xe9\xde\xedU\x80\x89\x0f\x16hello again'
          127.0.0.1 - - [27/Sep/2016 18:14:00] "POST / HTTP/1.1" 200 -
          2016-09-27 18:14:00,355 INFO ipc.py:665 : Response sent
          2016-09-27 18:14:00,356 INFO ipc.py:219 : Processing handshake response:

          {'serverHash': None, 'match': 'BOTH', 'meta': None, 'serverProtocol': None}

          2016-09-27 18:14:00,356 INFO test_ipc.py:149 : Received echo response: {'timestamp': 1475018040355, 'ping': {'text': 'hello again', 'timestamp': 123456}}
          ok
          testEquivalenceAfterRoundTrip (avro.tests.test_protocol.TestProtocol) ... ok
          testInnerNamespaceNotRendered (avro.tests.test_protocol.TestProtocol) ... ok
          testInnerNamespaceSet (avro.tests.test_protocol.TestProtocol) ... ok
          testParse (avro.tests.test_protocol.TestProtocol) ... ok
          testValidCastToStringAfterParse (avro.tests.test_protocol.TestProtocol) ... ok
          testCorrectRecursiveExtraction (avro.tests.test_schema.TestSchema) ... ok
          testDocAttributes (avro.tests.test_schema.TestSchema) ... ok
          testEquivalenceAfterRoundTrip (avro.tests.test_schema.TestSchema) ... ok
          testFullname (avro.tests.test_schema.TestSchema)
          The fullname is determined in one of the following ways: ... ok
          testOtherAttributes (avro.tests.test_schema.TestSchema) ... ok
          testParse (avro.tests.test_schema.TestSchema) ... ok
          testValidCastToStringAfterParse (avro.tests.test_schema.TestSchema) ... ok
          testMultiFile (avro.tests.test_script.TestWrite) ... ok
          testOutfile (avro.tests.test_script.TestWrite) ... ok
          testStdin (avro.tests.test_script.TestWrite) ... ok
          testVersion (avro.tests.test_script.TestWrite) ... ok
          testWriteCsv (avro.tests.test_script.TestWrite) ... ok
          testWriteJson (avro.tests.test_script.TestWrite) ... ok

          ----------------------------------------------------------------------
          Ran 50 tests in 2.305s

          OK
          ```

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/ssaamm/avro master

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/avro/pull/133.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #133


          commit 846ac19a1c944865f1d96cc767e713ee1f25c4ea
          Author: Samuel Taylor <github@samueltaylor.org>
          Date: 2016-09-27T23:08:58Z

          AVRO-1788: Implement Python 2 API


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user ssaamm opened a pull request: https://github.com/apache/avro/pull/133 AVRO-1788 : Implement Python 2 API The Python 2 API and the Python 3 API differ unnecessarily, making it more difficult to write code that supports both major Python versions. Additionally, a lot of these function names were non-Pythonic. This contribution is my original work, and I license the work to the project under the project's open source license. Tests pass: ``` /Users/sam/dev/avro/lang/py3/env/lib/python3.5/site-packages/setuptools/dist.py:294: UserWarning: The version specified ('1.9.0-SNAPSHOT') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details. "details." % self.metadata.version testCsv (avro.tests.test_script.TestCat) ... ok testCsvHeader (avro.tests.test_script.TestCat) ... ok testFields (avro.tests.test_script.TestCat) ... ok testFiles (avro.tests.test_script.TestCat) ... ok testFilter (avro.tests.test_script.TestCat) ... ok testHelp (avro.tests.test_script.TestCat) ... ok testJsonPretty (avro.tests.test_script.TestCat) ... ok testPrint (avro.tests.test_script.TestCat) ... ok testPrintSchema (avro.tests.test_script.TestCat) ... ok testSkip (avro.tests.test_script.TestCat) ... ok testVersion (avro.tests.test_script.TestCat) ... ok testAppend (avro.tests.test_datafile.TestDataFile) ... ok testContextManager (avro.tests.test_datafile.TestDataFile) ... ok testMetadata (avro.tests.test_datafile.TestDataFile) ... ok testRoundTrip (avro.tests.test_datafile.TestDataFile) ... ok testInterop (avro.tests.test_datafile_interop.TestDataFileInterop) ... ok testSymbolsInOrder (avro.tests.test_enum.TestEnum) ... ok testSymbolsInReverseOrder (avro.tests.test_enum.TestEnum) ... ok testBinaryIntEncoding (avro.tests.test_io.TestIO) ... ok testBinaryLongEncoding (avro.tests.test_io.TestIO) ... ok testDefaultValue (avro.tests.test_io.TestIO) ... ok testFieldOrder (avro.tests.test_io.TestIO) ... ok testNoDefaultValue (avro.tests.test_io.TestIO) ... ok testProjection (avro.tests.test_io.TestIO) ... ok testRoundTrip (avro.tests.test_io.TestIO) ... ok testSchemaPromotion (avro.tests.test_io.TestIO) ... ok testSkipInt (avro.tests.test_io.TestIO) ... ok testSkipLong (avro.tests.test_io.TestIO) ... ok testTypeException (avro.tests.test_io.TestIO) ... ok testUnknownSymbol (avro.tests.test_io.TestIO) ... ok testValidate (avro.tests.test_io.TestIO) ... ok testEchoService (avro.tests.test_ipc.TestIPC) Tests client-side of the Echo service. ... 2016-09-27 18:14:00,348 INFO test_ipc.py:118 : Echo RPC Server listening on 127.0.0.1:57632 2016-09-27 18:14:00,348 INFO test_ipc.py:119 : RPC socket: <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 57632)> 2016-09-27 18:14:00,349 INFO ipc.py:179 : Sending handshake request: {'serverHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2', 'clientHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2'} 2016-09-27 18:14:00,350 INFO ipc.py:204 : writing request: {'ping': {'text': 'hello ping', 'timestamp': 31415}} 2016-09-27 18:14:00,350 INFO ipc.py:654 : Serialized request: b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2\x00\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2\x00\x00\x08ping\xee\xea\x03\x14hello ping' 2016-09-27 18:14:00,351 INFO ipc.py:412 : Processing handshake request: {'serverHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2', 'clientProtocol': None, 'meta': None, 'clientHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2'} 2016-09-27 18:14:00,351 INFO ipc.py:441 : Handshake response: {'match': 'BOTH'} 2016-09-27 18:14:00,351 INFO ipc.py:375 : Processing request: {'ping': {'text': 'hello ping', 'timestamp': 31415}} 2016-09-27 18:14:00,351 INFO test_ipc.py:90 : Message: {"response": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Pong", "fields": [ {"type": "long", "name": "timestamp", "default": -1} , {"type": "org.apache.avro.ipc.echo.Ping", "name": "ping"} ]}, "errors": [], "request": [{"type": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Ping", "fields": [ {"type": "long", "name": "timestamp", "default": -1} , {"type": "string", "name": "text", "default": ""} ]}, "name": "ping"}]} 2016-09-27 18:14:00,351 INFO test_ipc.py:91 : Request: {'ping': {'text': 'hello ping', 'timestamp': 31415}} 2016-09-27 18:14:00,352 INFO ipc.py:656 : Serialized response: b'\x00\x00\x00\x00\x00\x00\xbe\x90\xe9\xde\xedU\xee\xea\x03\x14hello ping' 127.0.0.1 - - [27/Sep/2016 18:14:00] "POST / HTTP/1.1" 200 - 2016-09-27 18:14:00,352 INFO ipc.py:665 : Response sent 2016-09-27 18:14:00,353 INFO ipc.py:219 : Processing handshake response: {'serverHash': None, 'match': 'BOTH', 'meta': None, 'serverProtocol': None} 2016-09-27 18:14:00,353 INFO test_ipc.py:143 : Received echo response: {'timestamp': 1475018040351, 'ping': {'text': 'hello ping', 'timestamp': 31415}} 2016-09-27 18:14:00,353 INFO ipc.py:179 : Sending handshake request: {'serverHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2', 'clientHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2'} 2016-09-27 18:14:00,353 INFO ipc.py:204 : writing request: {'ping': {'text': 'hello again', 'timestamp': 123456}} 2016-09-27 18:14:00,354 INFO ipc.py:654 : Serialized request: b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2\x00\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2\x00\x00\x08ping\x80\x89\x0f\x16hello again' 2016-09-27 18:14:00,354 INFO ipc.py:412 : Processing handshake request: {'serverHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2', 'clientProtocol': None, 'meta': None, 'clientHash': b'\xcc9\x86\xfb\xb6\xad\x8a\ni\xf9X\xbb\x06\xc6\x15\xb2'} 2016-09-27 18:14:00,355 INFO ipc.py:441 : Handshake response: {'match': 'BOTH'} 2016-09-27 18:14:00,355 INFO ipc.py:375 : Processing request: {'ping': {'text': 'hello again', 'timestamp': 123456}} 2016-09-27 18:14:00,355 INFO test_ipc.py:90 : Message: {"response": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Pong", "fields": [ {"type": "long", "name": "timestamp", "default": -1} , {"type": "org.apache.avro.ipc.echo.Ping", "name": "ping"} ]}, "errors": [], "request": [{"type": {"type": "record", "namespace": "org.apache.avro.ipc.echo", "name": "Ping", "fields": [ {"type": "long", "name": "timestamp", "default": -1} , {"type": "string", "name": "text", "default": ""} ]}, "name": "ping"}]} 2016-09-27 18:14:00,355 INFO test_ipc.py:91 : Request: {'ping': {'text': 'hello again', 'timestamp': 123456}} 2016-09-27 18:14:00,355 INFO ipc.py:656 : Serialized response: b'\x00\x00\x00\x00\x00\x00\xc6\x90\xe9\xde\xedU\x80\x89\x0f\x16hello again' 127.0.0.1 - - [27/Sep/2016 18:14:00] "POST / HTTP/1.1" 200 - 2016-09-27 18:14:00,355 INFO ipc.py:665 : Response sent 2016-09-27 18:14:00,356 INFO ipc.py:219 : Processing handshake response: {'serverHash': None, 'match': 'BOTH', 'meta': None, 'serverProtocol': None} 2016-09-27 18:14:00,356 INFO test_ipc.py:149 : Received echo response: {'timestamp': 1475018040355, 'ping': {'text': 'hello again', 'timestamp': 123456}} ok testEquivalenceAfterRoundTrip (avro.tests.test_protocol.TestProtocol) ... ok testInnerNamespaceNotRendered (avro.tests.test_protocol.TestProtocol) ... ok testInnerNamespaceSet (avro.tests.test_protocol.TestProtocol) ... ok testParse (avro.tests.test_protocol.TestProtocol) ... ok testValidCastToStringAfterParse (avro.tests.test_protocol.TestProtocol) ... ok testCorrectRecursiveExtraction (avro.tests.test_schema.TestSchema) ... ok testDocAttributes (avro.tests.test_schema.TestSchema) ... ok testEquivalenceAfterRoundTrip (avro.tests.test_schema.TestSchema) ... ok testFullname (avro.tests.test_schema.TestSchema) The fullname is determined in one of the following ways: ... ok testOtherAttributes (avro.tests.test_schema.TestSchema) ... ok testParse (avro.tests.test_schema.TestSchema) ... ok testValidCastToStringAfterParse (avro.tests.test_schema.TestSchema) ... ok testMultiFile (avro.tests.test_script.TestWrite) ... ok testOutfile (avro.tests.test_script.TestWrite) ... ok testStdin (avro.tests.test_script.TestWrite) ... ok testVersion (avro.tests.test_script.TestWrite) ... ok testWriteCsv (avro.tests.test_script.TestWrite) ... ok testWriteJson (avro.tests.test_script.TestWrite) ... ok ---------------------------------------------------------------------- Ran 50 tests in 2.305s OK ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/ssaamm/avro master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/avro/pull/133.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #133 commit 846ac19a1c944865f1d96cc767e713ee1f25c4ea Author: Samuel Taylor <github@samueltaylor.org> Date: 2016-09-27T23:08:58Z AVRO-1788 : Implement Python 2 API
          Hide
          manu-chroma Manvendra Singh added a comment -

          What is the status of this bug? I am contributing to a project which is working towards supporting both python2.7 and python3, and it relies very heavily on avro.

          It would be great if we can have a unified API for avro. This would make the support for python 3 really smooth. Otherwise, we'll be struggling unnecessarily and will end up writing more code.

          I'm willing put work into resolving this issue. I'd be grateful if someone could point me to what needs to be done.
          Thanks.

          Show
          manu-chroma Manvendra Singh added a comment - What is the status of this bug? I am contributing to a project which is working towards supporting both python2.7 and python3, and it relies very heavily on avro. It would be great if we can have a unified API for avro. This would make the support for python 3 really smooth. Otherwise, we'll be struggling unnecessarily and will end up writing more code. I'm willing put work into resolving this issue. I'd be grateful if someone could point me to what needs to be done. Thanks.

            People

            • Assignee:
              Unassigned
              Reporter:
              ahasha@gmail.com Alexander Hasha
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:

                Development