The Python 2.7 thread module has been renamed to _thread in
Python3. This package was importing the _thread anyway, and was thus
fallbacking to the dummy_thread32 module everytime, which is far from
failproof (eg. lru_cache decorator used in a WSGI app started on uWSGI
with threads enabled and high concurrency raises exceptions).
This fix loads the thread module accordingly, without trying to load
Python3 _thread module since setup.py prevents installation on Python 3 explicitly.
The Python 2.7
thread
module has been renamed to_thread
in Python3. This package was importing the_thread
anyway, and was thus fallbacking to thedummy_thread32
module everytime, which is far from failproof (eg.lru_cache
decorator used in a WSGI app started on uWSGI with threads enabled and high concurrency raises exceptions).This fix loads the
thread
module accordingly, without trying to load Python3_thread
module since setup.py prevents installation on Python 3 explicitly.