MemcachedSessionInterface was checking if the key was unicode, and if so encoding it to a string. In python 3 there is no longer a unicode class, but instead the bytes class. This update checks the version of python and if it's 2, it behaves as it did before, if it's 3, it checks to see if the key is a bytes object, and if so decodes it to a string object.