From 9cacc355469ee9a5558f0f20e1ab948f572a619b Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Fri, 27 Sep 2024 16:17:34 +0200 Subject: [PATCH] Remove workaround for eventlet bug #592 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 Change-Id: I1e15e9ff28b4e3ee58804d7a3f3c0162b2761d2e --- glance/cmd/api.py | 7 ------- glance/cmd/scrubber.py | 7 ------- 2 files changed, 14 deletions(-) diff --git a/glance/cmd/api.py b/glance/cmd/api.py index 7cc3a61a66..8bb807a513 100644 --- a/glance/cmd/api.py +++ b/glance/cmd/api.py @@ -33,13 +33,6 @@ if os.name == 'nt': else: eventlet.patcher.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 -orig_threading.current_thread.__globals__['_active'] = threading._active - from oslo_reports import guru_meditation_report as gmr from oslo_utils import encodeutils diff --git a/glance/cmd/scrubber.py b/glance/cmd/scrubber.py index 09e1928066..107fc9c6f3 100644 --- a/glance/cmd/scrubber.py +++ b/glance/cmd/scrubber.py @@ -31,13 +31,6 @@ if os.name == 'nt': else: eventlet.patcher.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 -orig_threading.current_thread.__globals__['_active'] = threading._active - import subprocess # If ../glance/__init__.py exists, add ../ to Python search path, so that