From 6b4aaab2426e1ebb064b28bf3afec0f2e1bc925d Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 27 Sep 2024 23:59:48 +0900 Subject: [PATCH] Remove workaround for eventlet < 0.27.0 This code worked around a bug in eventlet[1] that has been fixed in 6533958f5fcec8b1577f56834ea2dc75a4f211e3. 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: I2ccff0294555d63e7bfe68cf71253cfef82d0172 --- barbican/cmd/keystone_listener.py | 7 ------- barbican/cmd/retry_scheduler.py | 6 ------ barbican/cmd/worker.py | 6 ------ requirements.txt | 2 +- 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/barbican/cmd/keystone_listener.py b/barbican/cmd/keystone_listener.py index b6c25716d..10975f12c 100644 --- a/barbican/cmd/keystone_listener.py +++ b/barbican/cmd/keystone_listener.py @@ -27,13 +27,6 @@ import sys # To have remote debugging, thread module needs to be disabled. # eventlet.monkey_patch(thread=False) 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 - # 'Borrowed' from the Glance project: # If ../barbican/__init__.py exists, add ../ to Python search path, so that diff --git a/barbican/cmd/retry_scheduler.py b/barbican/cmd/retry_scheduler.py index edfc93f6a..115cd03bd 100644 --- a/barbican/cmd/retry_scheduler.py +++ b/barbican/cmd/retry_scheduler.py @@ -25,12 +25,6 @@ import sys # Oslo messaging RPC server uses 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 -import threading # noqa -orig_threading.current_thread.__globals__['_active'] = threading._active # 'Borrowed' from the Glance project: # If ../barbican/__init__.py exists, add ../ to Python search path, so that diff --git a/barbican/cmd/worker.py b/barbican/cmd/worker.py index 59a6449ff..a5d8b6cc4 100644 --- a/barbican/cmd/worker.py +++ b/barbican/cmd/worker.py @@ -25,12 +25,6 @@ import sys # Oslo messaging RPC server uses 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 -import threading # noqa -orig_threading.current_thread.__globals__['_active'] = threading._active # 'Borrowed' from the Glance project: # If ../barbican/__init__.py exists, add ../ to Python search path, so that diff --git a/requirements.txt b/requirements.txt index 44d7be0d6..66770f941 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ alembic>=0.8.10 # MIT cffi>=1.7.0 # MIT cryptography>=2.1 # BSD/Apache-2.0 -eventlet>=0.18.2,!=0.18.3,!=0.20.1 # MIT +eventlet>=0.27.0 # MIT jsonschema>=3.2.0 # MIT oslo.config>=6.4.0 # Apache-2.0 oslo.context>=2.22.0 # Apache-2.0