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 2021/03/15 18:54:00 UTC

[jira] [Commented] (AVRO-1751) Add support for Schema Compatibility check in python API

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

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

Commit f67e53ac7e8592b609ba46ea9cd4d73c350baa85 in avro's branch refs/heads/master from Tincu Gabriel
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=f67e53a ]

AVRO-1751: Add python3 compatibility (#979)

* AVRO-1751: add python3 compatibility

Keeping in line with the same logic present in the avro java library
that handles type promotions, this aims to be a faithful adaptation of
that code in python.

Most tests were also ported, with the exception of the ones dealing with
enum default, since the python api does not support that yet

See https://github.com/apache/avro/blob/master/lang/java/avro/src/main/java/org/apache/avro/SchemaCompatibility.java

* typing: fix mypy issues

Merge is now a function instead of a SchemaCompatibilityResult method to
circumvent the fact that a method cannot receive type hints of it's own
type without __future__ imports until 3.7 an without until 3.10

More at https://www.python.org/dev/peps/pep-0563/

* style: make compat code python3.5 compatible

- remove f-string
- remove class member annotations

Co-authored-by: Gabriel Tincu <ga...@aiven.io>

> Add support for Schema Compatibility check in python API
> --------------------------------------------------------
>
>                 Key: AVRO-1751
>                 URL: https://issues.apache.org/jira/browse/AVRO-1751
>             Project: Apache Avro
>          Issue Type: Task
>          Components: python
>    Affects Versions: 1.7.7
>            Reporter: Blessan Thevalethu Abraham
>            Priority: Major
>
> The java API has support for schema compatibility check as documented [here | http://avro.apache.org/docs/current/spec.html#Schema+Resolution] via {{org.apache.avro.SchemaCompatibility}}. This is very helpful to ensure that changes made to the schema is backwards compatible. This request is to implement the same in the python API



--
This message was sent by Atlassian Jira
(v8.3.4#803005)