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

import aiokafka fails with latest kafka-python library #590

Closed
anantkaushik1989 opened this issue Feb 29, 2020 · 5 comments
Closed

import aiokafka fails with latest kafka-python library #590

anantkaushik1989 opened this issue Feb 29, 2020 · 5 comments

Comments

@anantkaushik1989
Copy link

Steps to reproduce -

  • pip3 install kakfa-python
  • check kafka-python is latest version (2.0.0 or above)
  • pip3 install aiokafka
  • open python3 interpreter
  • import kafka

Error results as 'ImportError: kafka.errors has no attribute ConnectionError'

ConnectionError is in aiokafka/errors.py, but not in latest kafka-python code base on github.

https://github.com/aio-libs/aiokafka/blob/master/aiokafka/errors.py#L71

https://github.com/dpkp/kafka-python/blob/2.0.1/kafka/errors.py - The commit shows clearly ConnectionError is deprecated.

@tvoinarovskyi
Copy link
Member

Will look into this for 0.6.0. Thanks!

@anantkaushik1989
Copy link
Author

Thank you Taras. May I ask when is 0.6.0 planned for release?

@tvoinarovskyi
Copy link
Member

@anantkaushik1989 I want to do it this week, but I am hesitant to promise that as my time schedule is quite horrible. Will keep you posted )

@anantkaushik1989
Copy link
Author

Thank you so much Taras for the update. Please let me know if I can assist in any way to help you in this. I can raise a small PR with deprecating this exception, if that is fine :)

Btw, awesome module. Really makes life so easy for use cases which are IO intensive 👍

@tvoinarovskyi
Copy link
Member

tvoinarovskyi commented Mar 1, 2020

@anantkaushik1989 If you could replace all usage of ConnectionError from aiokafka.errors package to KafkaConnectionError that would be a great PR. Import in errors also change to:

try:
    from kafka.errors import KafkaConnectionError
except ImportError:
    from kafka.errors import ConnectionError as KafkaConnectionError

It should solve the issue. Also bumping kafka-python dependency would be great, as most would want the latest version anyway.

yumendy added a commit to yumendy/aiokafka that referenced this issue Mar 7, 2020
yumendy added a commit to yumendy/aiokafka that referenced this issue Mar 7, 2020
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

No branches or pull requests

2 participants