Simplify lock recipe in a post Python 3.2 threading world.
The lock recipe assumes threading.Lock.acquire() does not take a timeout argument.
https://github.com/python-zk/kazoo/blob/b20c929421ff72421ad3770fb3436d583df5e5b0/kazoo/recipe/lock.py#L173
https://docs.python.org/3/library/threading.html#threading.Lock.acquire
Changed in version 3.2: The timeout parameter is new.
Code can be simplified a lot now that Py2x and py3 < 3.6 support is dropped.
(Note that Gevent and Eventlet Lock already have a timeout argument)
Do you think starting a feat/drop-python2-support branch to work on it would be a good idea?
I certainly would support simplifying this code.
I'd suggest doing it in pieces... ie, this is an obvious candidate for a PR all by itself. Doing it as a separate branch with such a broad scope of "drop all python 2 support" is a much bigger task...
Just wanted to say thanks @ceache and @StephenSorriaux for all the efforts that you've been landing lately, including this.