Skip to content

Python 3 support #224

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

Closed
wants to merge 13 commits into from
Closed

Python 3 support #224

wants to merge 13 commits into from

Conversation

brutasse
Copy link
Contributor

@brutasse brutasse commented Sep 2, 2014

Hello,

I've worked on a python3-compatible branch. The goal is to have compatibility with Python 2.6-2.7 and 3.3-3.4 with the same codebase.

Most changes are actually in tests. Python 3 being stricter at bytes vs. text handling, we need to send actual bytes to Kafka. I've assumed it's safer to let the user encode data before passing it, instead of automatically using an UTF-8 encoding when seeing unicode data.

There are two remaining failing tests on Python 3: the async/multiprocessing consumer onces. I found them quite painful to debug…

I'm not planning to continue to work on it but feel free to use this branch as a starting point. Perhaps someone more familiar with the codebase can fix the remaining failing tests.

@dpkp
Copy link
Owner

dpkp commented Sep 3, 2014

thanks -- looks like some great work that hopefully someone can pick up and carry over the finish line soon.

@wizzat
Copy link
Collaborator

wizzat commented Sep 3, 2014

I spent some time looking at it yesterday. It passes python 2, except for the flaky test. The python 3 multiprocessing tests fail. We need to either then off nose with-id or specify an id file per target env, because the py2 tests fail to build locally due to pickle errors after running the py3 tests.

On Sep 3, 2014, at 0:16, Dana Powers notifications@github.com wrote:

thanks -- looks like some great work that hopefully someone can pick up and carry over the finish line soon.


Reply to this email directly or view it on GitHub.

@dpkp
Copy link
Owner

dpkp commented Sep 3, 2014

I think the py2 test failures are real. Looks like there are 3 places in kafka/client.py where we try to log the encoded request bytes. those should probably get sent through binascii.b2a_hex first

This was referenced Sep 3, 2014
@dpkp
Copy link
Owner

dpkp commented Sep 6, 2014

Commits moved to PR #227 for final cleanup / merge.

@dpkp dpkp closed this Sep 6, 2014
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 this pull request may close these issues.

3 participants