diff --git a/oslo_concurrency/lockutils.py b/oslo_concurrency/lockutils.py index 2111486..4685d80 100644 --- a/oslo_concurrency/lockutils.py +++ b/oslo_concurrency/lockutils.py @@ -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 diff --git a/releasenotes/notes/deprecate-eventlet-within-lockutils-cba49086d7a65042.yaml b/releasenotes/notes/deprecate-eventlet-within-lockutils-cba49086d7a65042.yaml new file mode 100644 index 0000000..ac96063 --- /dev/null +++ b/releasenotes/notes/deprecate-eventlet-within-lockutils-cba49086d7a65042.yaml @@ -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. diff --git a/requirements.txt b/requirements.txt index b106d86..ebfd391 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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