We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1349af0 commit beccd37Copy full SHA for beccd37
src/confluent_kafka/avro/load.py
@@ -23,7 +23,7 @@ def loads(schema_str):
23
""" Parse a schema given a schema string """
24
try:
25
return schema.parse(schema_str)
26
- except schema.SchemaParseException as e:
+ except SchemaParseException as e:
27
raise ClientError("Schema parse failed: %s" % (str(e)))
28
29
@@ -42,6 +42,13 @@ def _hash_func(self):
42
43
from avro import schema
44
45
+ try:
46
+ # avro >= 1.11.0
47
+ from avro.errors import SchemaParseException
48
+ except ImportError:
49
+ # avro < 1.11.0
50
+ from avro.schema import SchemaParseException
51
+
52
schema.RecordSchema.__hash__ = _hash_func
53
schema.PrimitiveSchema.__hash__ = _hash_func
54
schema.UnionSchema.__hash__ = _hash_func
0 commit comments