diff --git a/oslo_cache/_bmemcache_pool.py b/oslo_cache/_bmemcache_pool.py index eee22eec..273a1972 100644 --- a/oslo_cache/_bmemcache_pool.py +++ b/oslo_cache/_bmemcache_pool.py @@ -15,7 +15,7 @@ """Thread-safe connection pool for python-binary-memcached.""" -import debtcollector +import warnings try: import eventlet @@ -29,8 +29,10 @@ LOG = log.getLogger(__name__) if eventlet and eventlet.patcher.is_monkey_patched('thread'): - debtcollector.deprecate( - "Eventlet support is deprecated and will be removed." + warnings.warn( + "Eventlet support is deprecated and will be removed.", + category=DeprecationWarning, + stacklevel=3, ) diff --git a/oslo_cache/_memcache_pool.py b/oslo_cache/_memcache_pool.py index 3599fc2e..3bd7b4bd 100644 --- a/oslo_cache/_memcache_pool.py +++ b/oslo_cache/_memcache_pool.py @@ -21,8 +21,7 @@ import itertools import queue import threading import time - -import debtcollector +import warnings try: import eventlet @@ -39,8 +38,10 @@ LOG = log.getLogger(__name__) if eventlet and eventlet.patcher.is_monkey_patched('thread'): - debtcollector.deprecate( - "Eventlet support is deprecated and will be removed." + warnings.warn( + "Eventlet support is deprecated and will be removed.", + category=DeprecationWarning, + stacklevel=3, ) diff --git a/requirements.txt b/requirements.txt index 122d81fe..c3e0e0e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,3 @@ oslo.config>=8.1.0 # Apache-2.0 oslo.i18n>=5.0.0 # Apache-2.0 oslo.log>=4.2.1 # Apache-2.0 oslo.utils>=4.2.0 # Apache-2.0 -debtcollector>=3.0.0 # Apache-2.0