Don't assume values are unicode, they could be just binary#78
Conversation
|
Seems like necessary change to me. Can you please add the unit-test fix for python3 to this pull request? |
|
Hi, I pushed a new commit b3175af that fixes the python3 binary values storing issue. Now tornadoredis handles values more like pyredis under python3, meaning all values are of type 'bytes' and users need to handling the encoding themselves. Some of the tests in test_pubsub don't pass on master, so I decorated them with @Skip(), but all other tests including the one I've added in prev commit now pass for py27 and py34, I changed a lot of the asserts to work with the bytes instead of str. I'm not an expert on encoding so code review and comments are appreciated :) Thanks. |
|
+1, |
When trying to retrieve a binary value (e.g. an image) an UnicodeDecodeError raises as it tries to decode the response to utf-8.
While debugging I've noticed a couple of things:
Thanks.