From 130a7253bc1efd38a96296b3a169a206fd9ed50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Wed, 29 Jan 2025 14:56:56 +0100 Subject: [PATCH] deprecate the eventlet handler from the zookeeper driver Change-Id: I050f520117687276cbd895079e292414b1d91619 --- ...ecate-kazoo-eventlet-handler-4f931cf058f38200.yaml | 11 +++++++++++ requirements.txt | 1 + tooz/drivers/zookeeper.py | 5 +++++ 3 files changed, 17 insertions(+) create mode 100644 releasenotes/notes/deprecate-kazoo-eventlet-handler-4f931cf058f38200.yaml diff --git a/releasenotes/notes/deprecate-kazoo-eventlet-handler-4f931cf058f38200.yaml b/releasenotes/notes/deprecate-kazoo-eventlet-handler-4f931cf058f38200.yaml new file mode 100644 index 00000000..59305f5b --- /dev/null +++ b/releasenotes/notes/deprecate-kazoo-eventlet-handler-4f931cf058f38200.yaml @@ -0,0 +1,11 @@ +--- +deprecations: + - | + Eventlet usages are deprecated and the removal of Eventlet from + OpenStack `is planned `_, + for this reason, using the ``eventlet`` handler from kazoo + available into the zookeeper driver is now deprecated. The support of + Eventlet will be soon removed from tooz. + + Please start considering removing your internal Eventlet usages and + start migrating your stack. diff --git a/requirements.txt b/requirements.txt index 0c3b5c19..8c122c1b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,3 +10,4 @@ tenacity>=5.0.0 # Apache-2.0 futurist>=1.2.0 # Apache-2.0 oslo.utils>=4.7.0 # Apache-2.0 oslo.serialization>=1.10.0 # Apache-2.0 +debtcollector>=3.0.0 # Apache-2.0 diff --git a/tooz/drivers/zookeeper.py b/tooz/drivers/zookeeper.py index a654d9b7..6e7dbba3 100644 --- a/tooz/drivers/zookeeper.py +++ b/tooz/drivers/zookeeper.py @@ -13,6 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. +import debtcollector from kazoo import client from kazoo import exceptions from kazoo import security @@ -494,6 +495,10 @@ class KazooDriver(coordination.CoordinationDriverCachedRunWatchers): 'verify_certs': strutils.bool_from_string(verify_certs), } handler_kind = options.get('handler') + if handler_kind == "eventlet": + debtcollector.deprecate( + "Eventlet support is deprecated and will be removed. " + "Use threading handler instead.") if handler_kind: try: handler_cls = self.HANDLERS[handler_kind]