Closed criemen closed 7 years ago
Since there already is a _compat
module, I would suggest adding something like this to it and avoid the extra dependency on six
:
if not PY2:
text_type = str
unichr = chr
binary_type = bytes
else:
text_type = unicode
unichr = unichr
binary_type = str
wrt six/_compat: you are right, this is addressed with the new commits.
@mbr can you please sign this off, as these constitute breaking changes for the users?
due to a wrong push, this was marked as merged, I reset the branch... Sorry!
Hi,
this PR contains the most critical changes for the next version, as they are breaking backwards compatibility. Dropping the memcached backend has a clear scope and ramifications, for the unicode change this is less clear. The test code mixed unicode- and nonunicode keys all over the place (except for python 3, where all string constants also were interpreted as unicode strings), never being totally clear which strings were supposed to be unicode strings and which were byte strings. Together with PR #42 this will enforce the correct string types throughout the API.