Support python3 < 3.4.2#4
Open
claws wants to merge 1 commit into
Open
Conversation
…tandalone etcd leader response
Owner
|
Seems good. I'd like to test it on travis with a python < 3.4.2 before i merge. Thank you |
Author
|
Any chance you were going to pull this request? I ask because I have had someone send me a pull request for additional changes because my fork is now leading yours. I also have a few fixes of my own to push too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request slightly modifies the implementation so that Python3 versions older than 3.4.2 can use this library. The
loop.create_taskis only available in 3.4.2 and as indicated here https://docs.python.org/3/library/asyncio-eventloop.html#coroutines the way to support older versions is by usingasyncio.async.I was running a stand alone
etcdinstance and when running the simple_client.py the leader function would return404 page not found. This seems to be the case when running etcd stand alone as I get the same thing when going directly to etcd.I've added a change so that the leader function will return the leader or None.
I have also added a simple
__str__to the Node class so that the simple_client.py script can display some meaningful information when it doesprint(result). So now instead of seeing:it will show: