From cf47f2e66358a0c803a26932c5cb63fee812ae49 Mon Sep 17 00:00:00 2001 From: Ryan Slominski Date: Mon, 26 Apr 2021 17:02:06 -0400 Subject: [PATCH 1/2] Document Fastavro tuple notation for unions Fixes: https://github.com/confluentinc/confluent-kafka-python/issues/656 --- src/confluent_kafka/schema_registry/avro.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/confluent_kafka/schema_registry/avro.py b/src/confluent_kafka/schema_registry/avro.py index 0a480e94c..84397cb6f 100644 --- a/src/confluent_kafka/schema_registry/avro.py +++ b/src/confluent_kafka/schema_registry/avro.py @@ -121,6 +121,11 @@ class AvroSerializer(Serializer): See ``avro_producer.py`` in the examples directory for example usage. + Note: + Tuple notation can be used to determine which branch of an ambiguous union to take. + + See `fastavro notation `_ + Args: schema_registry_client (SchemaRegistryClient): Schema Registry client instance. From ad2d93b56e3010424f0396f228e16d5a41a59c1e Mon Sep 17 00:00:00 2001 From: Ryan Slominski Date: Tue, 27 Apr 2021 09:16:52 -0400 Subject: [PATCH 2/2] Remove whitespace for flake8 --- src/confluent_kafka/schema_registry/avro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/confluent_kafka/schema_registry/avro.py b/src/confluent_kafka/schema_registry/avro.py index 84397cb6f..fca75ab9c 100644 --- a/src/confluent_kafka/schema_registry/avro.py +++ b/src/confluent_kafka/schema_registry/avro.py @@ -123,7 +123,7 @@ class AvroSerializer(Serializer): Note: Tuple notation can be used to determine which branch of an ambiguous union to take. - + See `fastavro notation `_ Args: