Hmm, is it possible the lock implementation does additional manipulation that is turning it into a byte-string before it goes in? I'll admit I haven't looked deeply into the Python 3 circumstances on this.