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 2019/11/27 12:25:00 UTC
[jira] [Commented] (AVRO-1880) Py3 Implementation vs Py2
Implementation API compatibility
[ https://issues.apache.org/jira/browse/AVRO-1880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16983472#comment-16983472 ]
ASF subversion and git services commented on AVRO-1880:
-------------------------------------------------------
Commit 790faee01824abe9623dcdcb38af0788df595727 in avro's branch refs/heads/master from Michael A. Smith
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=790faee ]
AVRO-1880: Futurize Py2 via BytesIO (#720)
* Replace buffer instead of truncating because bytesio.truncate does not seek.
> Py3 Implementation vs Py2 Implementation API compatibility
> ----------------------------------------------------------
>
> Key: AVRO-1880
> URL: https://issues.apache.org/jira/browse/AVRO-1880
> Project: Apache Avro
> Issue Type: Improvement
> Components: python
> Affects Versions: 1.8.1
> Reporter: Brian Bruggeman
> Priority: Major
>
> The Python3 API has been changed from the Python2 API and this can affect backwards compatibility when migrating or building libraries that work with both Python3 and Python2.
> The exact case I've found was 'validate' vs 'Validate'. Arguably, the python2 version is more correct from a Pep8 (see: https://www.python.org/dev/peps/pep-0008/) standpoint. I found no reason mentioned that I've found why the API might have been changed. In addition, the Python 3 API is inconsistent within itself: some functions are CamelCase and some are snake_case.
> While this may be out of scope for the issue above, I'm not sure why the current implementations are segregated. There doesn't appear to be a reason why there are two separate implementations for python: one for python 3 and one for python 2.
> Proposal is to create an API that is directly compatible with Python 2 and then deprecate the current Python 3 API where it is different.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)