From 27601346896b215d270dec647902d028dc97808e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 28 Sep 2024 00:13:24 +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: I5b0e90fe0e7d0429c65254f2944b19bfefebe631 --- os_ken/lib/hub.py | 7 ------- requirements.txt | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/os_ken/lib/hub.py b/os_ken/lib/hub.py index 774873db..dd49df0c 100644 --- a/os_ken/lib/hub.py +++ b/os_ken/lib/hub.py @@ -51,13 +51,6 @@ if HUB_TYPE == 'eventlet': def patch(thread=True): eventlet.monkey_patch(thread=thread) - if thread: - # 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 def spawn(*args, **kwargs): raise_error = kwargs.pop('raise_error', False) diff --git a/requirements.txt b/requirements.txt index 16802fbb..6e15ad8e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ # you find any incorrect lower bounds, let us know or propose a fix. pbr>=2.0.0 # Apache-2.0 -eventlet>=0.26.1 # MIT +eventlet>=0.27.0 # MIT msgpack>=1.0.0 # RPC library, BGP speaker(net_cntl) ncclient>=0.6.13 # Apache-2.0 netaddr>=0.7.18 # BSD