You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Manvendra Singh (JIRA)" <ji...@apache.org> on 2017/03/18 19:10:41 UTC

[jira] [Commented] (AVRO-1788) python api differs unnecessarily between python2 and python3

    [ https://issues.apache.org/jira/browse/AVRO-1788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15931334#comment-15931334 ] 

Manvendra Singh commented on AVRO-1788:
---------------------------------------

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. 

> python api differs unnecessarily between python2 and python3
> ------------------------------------------------------------
>
>                 Key: AVRO-1788
>                 URL: https://issues.apache.org/jira/browse/AVRO-1788
>             Project: Avro
>          Issue Type: Wish
>          Components: python
>            Reporter: Alexander Hasha
>            Priority: Minor
>
> 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:
> {code}
> from avro.schema import parse
> {code}
> and in python 3:
> {code}
> from avro.schema import Parse
> {code}
> 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?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)