Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The method schema.Parse() should be lower case #1005

Closed
7 tasks
casperlehmann opened this issue Dec 17, 2020 · 0 comments · Fixed by #1006
Closed
7 tasks

The method schema.Parse() should be lower case #1005

casperlehmann opened this issue Dec 17, 2020 · 0 comments · Fixed by #1006

Comments

@casperlehmann
Copy link
Contributor

Description

Capitalization of method name schema.Parse() has been deprecated since version 1.1.0 of avro-python3.

apache/avro#666

Meanwhile, avro-python3 is itself deprecated.

apache/avro@ad820ed

Future versions of the codebase should therefore look to implement the calls in accordance with the avro package instead of àvro-python3`.

How to reproduce

from confluent_kafka import avro
schema_string = avro.loads('''{
  "namespace": "com.example.test",
  "type": "record",
  "name": "test",
  "fields": [
    {
      "name": "test",
      "type": "string"
    }
  ]
}''')

Raises:

Traceback (most recent call last):
  File "my_error.py", line 7, in <module>
    schema_string = avro.loads('''{
  File "/Users/lricls/projects/bi-hub/.venv/lib/python3.8/site-packages/confluent_kafka/avro/load.py", line 29, in loads
    return schema.Parse(schema_str)
AttributeError: module 'avro.schema' has no attribute 'Parse'

Checklist

Please provide the following information:

  • confluent-kafka-python and librdkafka version (confluent_kafka.version() and confluent_kafka.libversion()): ('1.5.0', 17104896), ('1.5.0', 17105151)
  • Apache Kafka broker version:
  • Client configuration: {...}
  • Operating system: MacOS 10.15.7
  • Provide client logs (with 'debug': '..' as necessary)
  • Provide broker log excerpts
  • Critical issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant