This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit f32ddc4028581a7c16fbdc4dc9d4f134e57263cd
Author: Matteo Merli <[email protected]>
AuthorDate: Tue Nov 2 21:04:46 2021 -0700

    [Python] Provide __str__ operator for BytesSchema (#12593)
    
    (cherry picked from commit f982c499a3735b0dcb665334ff3992d0e0146d55)
---
 pulsar-client-cpp/python/pulsar/schema/schema.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pulsar-client-cpp/python/pulsar/schema/schema.py 
b/pulsar-client-cpp/python/pulsar/schema/schema.py
index 083efc3..13c5673 100644
--- a/pulsar-client-cpp/python/pulsar/schema/schema.py
+++ b/pulsar-client-cpp/python/pulsar/schema/schema.py
@@ -58,6 +58,9 @@ class BytesSchema(Schema):
     def decode(self, data):
         return data
 
+    def __str__(self):
+        return 'BytesSchema'
+
 
 class StringSchema(Schema):
     def __init__(self):
@@ -70,6 +73,10 @@ class StringSchema(Schema):
     def decode(self, data):
         return data.decode('utf-8')
 
+    def __str__(self):
+        return 'StringSchema'
+
+
 
 class JsonSchema(Schema):
 

Reply via email to