I was trying to get the lock using this module with python3, however lock.is_acquired() always returned False. After some investigation, I found the reason is that the values are not correctly decoded. utils._decode returns an instance of bytes instead of str in python3.
Run the unit tests with Python3 with etcd3 server running would reveal the issue.
I was trying to get the lock using this module with python3, however
lock.is_acquired()
always returnedFalse
. After some investigation, I found the reason is that the values are not correctly decoded.utils._decode
returns an instance ofbytes
instead ofstr
in python3.Run the unit tests with Python3 with etcd3 server running would reveal the issue.