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

Suraj Acharya commented on AVRO-1788:
-------------------------------------

To make it consistent you will need to change the way the fuction is called. 
Make it {{parse}}.
[py2|https://github.com/apache/avro/blob/master/lang/py/src/avro/schema.py#L771]
 and 
[py3|https://github.com/apache/avro/blob/master/lang/py3/avro/schema.py#L1261].

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|https://github.com/apache/avro/blob/master/lang/py/src/avro/io.py#L379]. 
Again make sure to change all the places from where it is referenced.

> 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
>            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.4#6332)

Reply via email to