Merge "deprecate eventlet monkey patch within lockutils"

This commit is contained in:
Zuul 2025-02-06 18:19:23 +00:00 committed by Gerrit Code Review
commit f7383fe40d
3 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -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.

View File

@ -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