deprecate eventlet monkey patch within lockutils

Change-Id: I83352849192489e6918898969b92ee3f8e2bca55
This commit is contained in:
Hervé Beraud 2025-01-30 10:42:38 +01:00 committed by Takashi Kajinami
parent c70e6eee79
commit 1da88a61a8
3 changed files with 15 additions and 0 deletions

@ -25,6 +25,7 @@ import tempfile
import threading
import weakref
import debtcollector
import fasteners
from oslo_config import cfg
from oslo_utils import reflection
@ -98,6 +99,8 @@ class ReaderWriterLock(fasteners.ReaderWriterLock):
# environment
if eventlet is not None and eventlet_patcher is not None:
if eventlet_patcher.is_monkey_patched('thread'):
debtcollector.deprecate(
"Eventlet support is deprecated and will be removed.")
self._current_thread = eventlet.getcurrent

@ -0,0 +1,11 @@
---
deprecations:
- |
Eventlet usages are deprecated and the removal of Eventlet from
OpenStack `is planned <https://governance.openstack.org/tc//goals/proposed/remove-eventlet.html>`_,
for this reason, using the ``lockutils`` module of oslo.concurrency in a
monkey patched environment is now deprecated. The support of Eventlet will
be soon removed from oslo.concurrency.
Please start considering removing your internal Eventlet usages and
start migrating your stack.

@ -7,3 +7,4 @@ oslo.config>=5.2.0 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
fasteners>=0.7.0 # Apache-2.0
debtcollector>=3.0.0 # Apache-2.0