You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by xy...@apache.org on 2022/12/06 03:17:24 UTC
[pulsar-client-python] branch main updated: fix: make sure that the fallback avro class has the signature as fastravro's (#57)
This is an automated email from the ASF dual-hosted git repository.
xyz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-python.git
The following commit(s) were added to refs/heads/main by this push:
new 9182dd7 fix: make sure that the fallback avro class has the signature as fastravro's (#57)
9182dd7 is described below
commit 9182dd7ab69266ad0fb630a129a3ef478c1f8ab0
Author: Jayson Reis <sa...@gmail.com>
AuthorDate: Tue Dec 6 04:17:20 2022 +0100
fix: make sure that the fallback avro class has the signature as fastravro's (#57)
This makes sure that the user get the information about avro support not being installed instead of a TypeError if the schema defitnition is not supplied
---
pulsar/schema/schema_avro.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pulsar/schema/schema_avro.py b/pulsar/schema/schema_avro.py
index 05ceb8e..3e629fb 100644
--- a/pulsar/schema/schema_avro.py
+++ b/pulsar/schema/schema_avro.py
@@ -85,7 +85,7 @@ if HAS_AVRO:
else:
class AvroSchema(Schema):
- def __init__(self, _record_cls, _schema_definition):
+ def __init__(self, _record_cls, _schema_definition=None):
raise Exception("Avro library support was not found. Make sure to install Pulsar client " +
"with Avro support: pip3 install 'pulsar-client[avro]'")