python-zk / kazoo

Kazoo is a high-level Python library that makes it easier to use Apache Zookeeper.
https://kazoo.readthedocs.io
Apache License 2.0
1.3k stars 387 forks source link

Bytes response in python3 #425

Closed mluscon closed 7 years ago

mluscon commented 7 years ago

Hi,

is it expected of get function to return a response in bytes instead of string in python3, or am I hitting some bug or misconfiguration? `

import kazoo.client c = kazoo.client.KazooClient('gaussalgo22:2181') c.start() c.get('/') (b'response', ZnodeStat(czxid=0, mzxid=0, ctime=0, mtime=0, version=0, cversion=251109, aversion=0, ephemeralOwner=0, dataLength=0, numChildren=7, pzxid=21486453100)) `

Thank you for any suggestions.

harlowja commented 7 years ago

Prob should be bytes right?, I didn't think zookeeper stated that all values would be utf8 (or other encoding)?

mluscon commented 7 years ago

Ok, thank you for the explanation.