diff options
author | Brant Knudson <bknudson@us.ibm.com> | 2015-07-24 14:14:13 -0500 |
---|---|---|
committer | Brant Knudson <bknudson@us.ibm.com> | 2015-07-26 06:54:23 -0500 |
commit | c5b03191b6714fed15bd88769c89e897257c337d (patch) | |
tree | 7fe4bc9d8662bb074ab257020d6b01a76413b0fb /keystoneclient/base.py | |
parent | fee5ba7432ff4b282aacbb8dafac948af2006f45 (diff) | |
download | python-keystoneclient-c5b03191b6714fed15bd88769c89e897257c337d.tar.gz |
Proper deprecation for Manager.api
base.Manager's api property wasn't properly deprecated since all it
had was documentation. Proper deprecation requires use of warnings
and documentation.
bp deprecations
Change-Id: Ic5e218151e9b3f3b66f78729052680691d5ad582
Diffstat (limited to 'keystoneclient/base.py')
-rw-r--r-- | keystoneclient/base.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/keystoneclient/base.py b/keystoneclient/base.py index eabbdc4..d2c3ea0 100644 --- a/keystoneclient/base.py +++ b/keystoneclient/base.py @@ -21,6 +21,7 @@ Base utilities to build API operation managers and objects on top of. import abc import functools +import warnings import six from six.moves import urllib @@ -91,8 +92,17 @@ class Manager(object): @property def api(self): - """Deprecated. Use `client` instead. + """The client. + + .. warning:: + + This property is deprecated as of the 1.7.0 release in favor of + :meth:`client` and may be removed in the 2.0.0 release. + """ + warnings.warn( + 'api is deprecated as of the 1.7.0 release in favor of client and ' + 'may be removed in the 2.0.0 release', DeprecationWarning) return self.client def _list(self, url, response_key, obj_class=None, body=None, **kwargs): |