Skip to content

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

Open
@vartec

Description

@vartec

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions