You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/01/29 08:55:01 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=17025714#comment-17025714 ] 

ASF subversion and git services commented on AVRO-1788:
-------------------------------------------------------

Commit e9eee386a14b592a7cca55a1214c14c10d03a3b2 in avro's branch refs/heads/branch-1.9 from Michael A. Smith
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=e9eee38 ]

AVRO-1788: Remove Obsolete Python < 2.7 Syntax (#683)


> python api differs unnecessarily between python2 and python3
> ------------------------------------------------------------
>
>                 Key: AVRO-1788
>                 URL: https://issues.apache.org/jira/browse/AVRO-1788
>             Project: Apache Avro
>          Issue Type: Wish
>          Components: python
>            Reporter: Alexander Hasha
>            Assignee: Michael A. Smith
>            Priority: Minor
>             Fix For: 1.10.0, 1.9.2
>
>
> 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
(v8.3.4#803005)