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
Add python 3 support. #126
Conversation
…n on Redis client and value_deserializer,value_serializer option on Kafka client to handle unicode problem. We also fix several syntax error and update several test cases.
Wow this is great! I had no idea I was actually so close to getting this project python 3 compatible, your changes make it seem so simple. This has been a long standing feature request, and given that the travis build is 👍 the only thing I would like to do is some internal validation and run it myself - the code looks good. Fixes #46 |
fix #128 It is an unicode issue as Kazoo client requires and returns byte type value when using get and set. Also fix related tests and add an online test for ZookeeperWatcher. |
Newest changes also look good. The only thing I see missing here is that we may need to add naive os tests, since Its an older artifact from older versions of scrapy cluster, but in past we used the ansible roles to deploy and ensure the project could run on both native ubuntu and centos. In a perfect world, I would like to duplicate them but for python3.6 instead. Those ansible tests run the whole offline and online test suite, which would pick your changes. That won't prevent me from merging this in though, but I may make a separate ticket to address it. |
If you run the utilities unit tests, both in python 2 and python 3 the unit tests fail at various stages. The For python 2 (/utils):
For python 3 (/utils):
I triple checked and made sure I had the latest build from this PR as the UPDATE: I think I see why this passed on travis, its because when I cut a release I removed the code that installs bleeding edge |
The important part here is this section of code that runs within the ansible travis tests. It not only uninstalls pypi scutils, but installs the bleeding edge source and then runs the full suite of offline and online unit tests. (of which we don't get in the docker suite tests) This could be caught in a variety of ways:
Both 1 and 2 above seem like good ideas and would help catch nagging scutils library updates that may arise within this PR. |
I've merged the newest commit and my travis build seems work fine. Also before I push my update I've passed all tests on my local docker environment. |
I have not been able to throw anything at this PR that did not pass all of my tests. I plan on merging this 🤞 tomorrow. Awesome work @gas1121! |
I'm just passing by. Is python 3 supported now? The README claims that python 2.7 is required. |
Use decode_responses option on Redis client and value_deserializer,value_serializer option on Kafka client to handle unicode problem. Also fix several syntax error and update several test cases for python 3. And as scrapy-cluster 1.2 use ujson instead of pickle, I think no migration is needed.