From a7dd51390c506fda1e0fad527aa191ad3a3a1ce0 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 28 Sep 2024 14:50:52 +0900 Subject: [PATCH] Remove workaround for eventlet < 0.27.0 This code worked around a bug in eventlet[1] that has been fixed in 115103d5608cbe8f15df10e27eba1644f5364e95. The fix has been available in every eventlet release since v0.27.0. [1] https://github.com/eventlet/eventlet/issues/592 Co-Authored-By: Cyril Roelandt Change-Id: Ifc0b9c1d7f022db54c34c48c903a1719f9404d04 --- requirements.txt | 1 + watcher/cmd/__init__.py | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/requirements.txt b/requirements.txt index a5c9930dc..b36dea279 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ # date but we do not test them so no guarantee of having them all correct. If # you find any incorrect lower bounds, let us know or propose a fix. apscheduler>=3.5.1 # MIT License +eventlet>=0.27.0 # MIT jsonpatch>=1.21 # BSD keystoneauth1>=3.4.0 # Apache-2.0 jsonschema>=3.2.0 # MIT diff --git a/watcher/cmd/__init__.py b/watcher/cmd/__init__.py index f3a20d42d..567eb1305 100644 --- a/watcher/cmd/__init__.py +++ b/watcher/cmd/__init__.py @@ -18,10 +18,3 @@ import eventlet 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 # noqa -import threading # noqa -orig_threading.current_thread.__globals__['_active'] = threading._active