Commits


Tincu Gabriel authored and GitHub committed f67e53ac7e8
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 <gabi@aiven.io>