diff --git a/murano/monkey_patch.py b/murano/monkey_patch.py index 28ec5f60c..094aeee4a 100644 --- a/murano/monkey_patch.py +++ b/murano/monkey_patch.py @@ -23,3 +23,9 @@ if os.name == 'nt': eventlet.monkey_patch(os=False) else: eventlet.monkey_patch() +# Monkey patch the original current_thread to use the up-to-date _active +# global variable. See https://bugs.launchpad.net/bugs/1863021 and +# https://github.com/eventlet/eventlet/issues/592 +import __original_module_threading as orig_threading +import threading # noqa +orig_threading.current_thread.__globals__['_active'] = threading._active diff --git a/tox.ini b/tox.ini index 70cfe7156..12611e7bc 100644 --- a/tox.ini +++ b/tox.ini @@ -95,7 +95,8 @@ whitelist_externals = rm show-source = true builtins = _ # W605 invalid escape sequence -ignore = W605,W504,W503,E123,H405 +# E402 fires an error on eventlet import. Should probably remove condition alltogether +ignore = W605,W504,W503,E123,H405,E402 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build [hacking]