dpkp / dpkp/kafka-python

Parallel packages (kafka-python & kafka) can cause unexpected behavior

Open
#1,253 2 comments 0 reactions 0 assignees View on GitHub
packaging
Dominant language
Python
Stars
5.9k
Forks
1.5k
Avg merge
3d 11h
Merged PRs (30d)
3

Description

I know this stems from #82, but the solution with having parallel copies of the same package can lead to unexpected behavior. Whichever package is installed later overwrites the one installed previously.

```
$ mkvirtualenv kafka-versions
$ pip install kafka-python==1.3.5
$ pip install kafka==1.0.0 # this emulates some 3rd party package requiring it
$ python -c 'import kafka; print(kafka.__version__)'
1.0.0

$ virtualenv --clear
$ pip install kafka==1.0.0 # this emulates some 3rd party package requiring it
$ pip install kafka-python==1.3.5
$ python -c 'import kafka; print(kafka.__version__)'
1.3.5

$ pip freeze
kafka==1.0.0
kafka-python==1.3.5
six==1.11.0
```

Maybe a solution would be to convert `kafka` package into a shim package with no code, only `setup.py` with `kafka-python` in the `install_requires`?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.