summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Riedemann <mriedem@us.ibm.com>2015-09-14 13:45:45 -0700
committerMatt Riedemann <mriedem@us.ibm.com>2015-09-14 13:45:45 -0700
commit4bbd5edc8b235592f59a808fa33fd6a994b23b2c (patch)
tree215825776bfacb4806f2af70ce3356fbf7bad8bf
parent7a25bdca0c0d7c7813a31f383f5fc6117480060d (diff)
downloadoslo-incubator-4bbd5edc8b235592f59a808fa33fd6a994b23b2c.tar.gz
Formally deprecate the memorycache module
In change I97dcd55838941de4bf31aa84b4af7b2cb8e4f116 it was pointed out that memorycache is deprecated and people should be moving onto using the oslo.cache library. This change uses debtcollector to log an actual deprecation warning for those using the memorycache module at runtime. Change-Id: Ib013c7b6586860944268b9eec41c6ae003f5e0c8
-rw-r--r--openstack/common/memorycache.py6
-rw-r--r--requirements.txt1
2 files changed, 7 insertions, 0 deletions
diff --git a/openstack/common/memorycache.py b/openstack/common/memorycache.py
index e72c26df..c6e10134 100644
--- a/openstack/common/memorycache.py
+++ b/openstack/common/memorycache.py
@@ -18,6 +18,7 @@
import copy
+from debtcollector import removals
from oslo_config import cfg
from oslo_utils import timeutils
@@ -30,6 +31,11 @@ CONF = cfg.CONF
CONF.register_opts(memcache_opts)
+# Indicate that this module is deprecated for removal and oslo.cache should
+# be used instead.
+removals.removed_module(__name__, 'oslo.cache')
+
+
def list_opts():
"""Entry point for oslo-config-generator."""
return [(None, copy.deepcopy(memcache_opts))]
diff --git a/requirements.txt b/requirements.txt
index adaadf1b..91859197 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,6 +4,7 @@
pbr<2.0,>=1.6
argparse
+debtcollector>=0.3.0 # Apache-2.0
greenlet>=0.3.2
Jinja2>=2.6 # BSD License (3 clause)
oslo.concurrency>=2.3.0 # Apache-2.0