ta1meng opened a new issue #10596:
URL: https://github.com/apache/pulsar/issues/10596


   **Describe the bug**
   There are many issues in the Python client library regarding Avro schema 
support:
   * The documented 
[example](https://pulsar.apache.org/docs/fr/client-libraries-python/#complex-types)
 does not work.
   * No support for `default` values.
   * No support for the `doc` attribute.
   * No support for the `namespace` attribute.
   * No support for required subrecords (required fields of type `record`)
   * Ordering bug when generating schema definition that makes schema 
incompatible with topic's registered schema.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Go to https://github.com/ta1meng/pulsar-python-avro-schema-examples
   2. Read the README files
   3. All issues above except one can be reproduced using the Python example 
applications in that repo
   4. The repo does not contain an example of the lack of support of explicit 
default values, but it's easy to see that shortcoming in code -- there is no 
code for `default` values inside the schema generation code.
   5. Apply the changes in the `schema_fix` directory to the Pulsar Python 
client library, so that all example applications will succeed.
   
   **Expected behavior**
   The [documented 
example](https://pulsar.apache.org/docs/fr/client-libraries-python/#complex-types)
 should work out of the box. There should be support for common Avro keywords 
like `default`, `doc`, and `namespace`.
   
   **Screenshots**
   N/A
   
   **Desktop (please complete the following information):**
    - OS: MacOS
   
   **Additional context**
   Tested agains Pulsar 2.7.1. Using Python Pulsar client 2.7.1 under Python 
3.7. Though issues and fixes should be appliable to Python 2.7 as well 
(untested).


-- 
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to