linkedin / linkedin/kafka-tools
kafka-tools overwrites kafka-python `__init__`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 599
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
Hey,
I am using `poetry` tool to manage my dependencies.
My package uses `aiokafka` for consumer/producer management with `kafka-python` as its dependency.
When istalling both `kafka-tools` and `aiokafka`, `kafka-tools` overwrites `__init__.py` file from `kafka-python` dependency, resulting in an error from aiokafka: `ImportError: cannot import name 'ConsumerRebalanceListener' from 'kafka'`.
How can I solve it? It obviously happens because both `kafka-python` and `kafka-tools` decided to name their modules `kafka`, which results in one overwriting another.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Poetry installation with both kafka-tools and aiokafka, then inspect the conflicting kafka __init__.py files and the failing ConsumerRebalanceListener import. Done means aiokafka imports successfully without kafka-tools overwriting kafka-python's package contents.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100