From 3e63ba196ae9d02efdf5da28af9bc494471150a7 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 27 Sep 2024 23:54:18 +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: I2cf47cf2a348d85c0f943ef49796700ded0d5711 --- heat/cmd/all.py | 6 ------ heat/cmd/api.py | 6 ------ heat/cmd/api_cfn.py | 6 ------ heat/cmd/engine.py | 6 ------ requirements.txt | 2 +- 5 files changed, 1 insertion(+), 25 deletions(-) diff --git a/heat/cmd/all.py b/heat/cmd/all.py index d9c7dd0d68..526bc7fa29 100644 --- a/heat/cmd/all.py +++ b/heat/cmd/all.py @@ -20,12 +20,6 @@ An OpenStack Heat server that can run all services. import eventlet eventlet.monkey_patch(os=False) -# 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 import sys diff --git a/heat/cmd/api.py b/heat/cmd/api.py index 4ab22b0d66..b8ea0111cf 100644 --- a/heat/cmd/api.py +++ b/heat/cmd/api.py @@ -20,12 +20,6 @@ An OpenStack ReST API to Heat. import eventlet eventlet.monkey_patch(os=False) -# 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 import sys diff --git a/heat/cmd/api_cfn.py b/heat/cmd/api_cfn.py index 2a44605e5c..bc7cd5b022 100644 --- a/heat/cmd/api_cfn.py +++ b/heat/cmd/api_cfn.py @@ -22,12 +22,6 @@ AMQP RPC to implement them. import eventlet eventlet.monkey_patch(os=False) -# 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 import sys diff --git a/heat/cmd/engine.py b/heat/cmd/engine.py index b969a4c22b..f30081d7e7 100644 --- a/heat/cmd/engine.py +++ b/heat/cmd/engine.py @@ -22,12 +22,6 @@ engine. 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 -import threading # noqa -orig_threading.current_thread.__globals__['_active'] = threading._active import sys diff --git a/requirements.txt b/requirements.txt index 5f3ad3fdfc..4f0a0b2c72 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ pbr>=3.1.1 # Apache-2.0 alembic>=1.8.0 # MIT croniter>=0.3.4 # MIT License cryptography>=2.5 # BSD/Apache-2.0 -eventlet>=0.18.2 # MIT +eventlet>=0.27.0 # MIT keystoneauth1>=3.18.0 # Apache-2.0 keystonemiddleware>=5.1.0 # Apache-2.0 lxml>=4.5.0 # BSD