deprecate using memcache_pool backend into an eventlet env.
Change-Id: I947a548a20dafb3b5f10f10f8d3a05a2ebfe1c22
This commit is contained in:
parent
bcd581c5d0
commit
dc043a7ab3
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
"""Thread-safe connection pool for python-binary-memcached."""
|
||||
import debtcollector
|
||||
try:
|
||||
import eventlet
|
||||
except ImportError:
|
||||
@ -25,6 +26,16 @@ from oslo_log import log
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
if eventlet and eventlet.patcher.is_monkey_patched('thread'):
|
||||
debtcollector.deprecate(
|
||||
"Eventlet support is deprecated "
|
||||
"and will be soon no longer supported. "
|
||||
"This backend was originally designed to be compatible with Eventlet "
|
||||
"and with monkey patching, so using this backend in an environment "
|
||||
"with eventlet is now deprecated. "
|
||||
"Please migrate your code and stop monkey patching your environment.")
|
||||
|
||||
|
||||
class _BMemcacheClient(bmemcached.Client):
|
||||
"""Thread global memcache client
|
||||
|
||||
|
@ -22,6 +22,7 @@ import queue
|
||||
import threading
|
||||
import time
|
||||
|
||||
import debtcollector
|
||||
try:
|
||||
import eventlet
|
||||
except ImportError:
|
||||
@ -36,6 +37,16 @@ from oslo_cache import exception
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
if eventlet and eventlet.patcher.is_monkey_patched('thread'):
|
||||
debtcollector.deprecate(
|
||||
"Eventlet support is deprecated "
|
||||
"and will be soon no longer supported. "
|
||||
"This backend was originally designed to be compatible with Eventlet "
|
||||
"and with monkey patching, so using this backend in an environment "
|
||||
"with eventlet is now deprecated. "
|
||||
"Please migrate your code and stop monkey patching your environment.")
|
||||
|
||||
|
||||
class _MemcacheClient(memcache.Client):
|
||||
"""Thread global memcache client
|
||||
|
||||
|
@ -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 ``memcache_pool`` backend of oslo.cache
|
||||
in an environment using eventlet is now deprecated.
|
||||
The support of Eventlet will be soon removed from oslo.cache.
|
||||
|
||||
Please start considering removing your internal Eventlet usages and
|
||||
start migrating your stack.
|
@ -7,3 +7,4 @@ 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user