Closed AngusP closed 5 years ago
This might also address #1 by using decode_responses
by giving unicode strings by default in Python 2 on returning reads from redis.
Thanks! I merged this one manually. I just published v0.4.0 which includes Python 3 support.
Flask_Split should now support both Python 2 and Python 3.
This will introduce a minor performance hit on Py2 as the iterators
iterkeys
are no-longer used (on Py3 these will be used).Additionally the correct
urlparse
for Py2 andurllib.parse
will be imported based on a caughtImportError
.The Redis-Py class instance is also started with the arg
decode_responses=True
, to ensurestr
s are passed rather thanbytes
in Python 3. For Python 2 this will returnunicode
strings - I don't currently have a Python 2 Flask app to play with to check this hasn't broken anything, but from a quick check in Python 2str(unicode('asdf')) == 'asdf'