erichare commented on code in PR #90:
URL: 
https://github.com/apache/pulsar-client-python/pull/90#discussion_r1093834455


##########
pulsar/schema/schema_avro.py:
##########
@@ -82,15 +82,6 @@ def decode(self, data):
                 return self._record_cls(**d)
             else:
                 return d
-
 else:
-    class AvroSchema(Schema):
-        def __init__(self, _record_cls, _schema_definition=None):
-            raise Exception("Avro library support was not found. Make sure to 
install Pulsar client " +
+    raise Exception("Avro library support was not found. Make sure to install 
Pulsar client " +

Review Comment:
   @keenborder786 the build checks are failing because we're importing 
everything from the schema:
   
   `from pulsar.schema import *`
   
   Basically the issue is just that if `fastavro` isn't available at import 
time, then the exception is raised... now someone actually intending to import 
AvroSchema, of course may want to know about the missing dependency right away 
(before initializing an instance of the class) - But i guess like the tests 
they could be trying to import everything - not the best practice of course. 
Still, I imagine we don't want to break that (i could see some users without 
fastavro also importing the entire schema module)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to