Deprecate utility for eventlet

Change-Id: I22f1b04e10ceb8cbca00d654573838c694dcdbcf
This commit is contained in:
Takashi Kajinami 2025-02-07 00:19:54 +09:00
parent 1928a9a715
commit 6ce78a4794
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,10 @@
---
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 the eventlet_utils module is now deprecated.
The support of Eventlet will be soon removed from taskflow.
Please start considering removing your internal Eventlet usages and
start migrating your stack.

View File

@ -7,6 +7,9 @@ pbr>=2.0.0 # Apache-2.0
# Packages needed for using this library.
# For deprecation warning
debtcollector>=1.2.0 # Apache-2.0
# For async and/or periodic work
futurist>=1.2.0 # Apache-2.0

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import debtcollector.removals
from oslo_utils import importutils
_eventlet = importutils.try_import('eventlet')
@ -21,6 +22,7 @@ _eventlet = importutils.try_import('eventlet')
EVENTLET_AVAILABLE = bool(_eventlet)
@debtcollector.removals.remove(message='Eventlet support is deprecated.')
def check_for_eventlet(exc=None):
"""Check if eventlet is available and if not raise a runtime error.