From 65b348e945088c9f524812381796d5c68d69f5d5 Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Thu, 17 Dec 2015 12:02:37 +1100 Subject: [PATCH] Deprecate the baseclient.Client We don't want to support other clients subclassing this. Deprecate it for removal. As far as I know noone else is using this class. Change-Id: Iad0ea860bd07c657d7094018c037b003ea92dc28 Implements: bp deprecate-to-ksa --- keystoneclient/baseclient.py | 7 +++++++ keystoneclient/httpclient.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/keystoneclient/baseclient.py b/keystoneclient/baseclient.py index 97943684d..ca39f6d14 100644 --- a/keystoneclient/baseclient.py +++ b/keystoneclient/baseclient.py @@ -10,10 +10,17 @@ # License for the specific language governing permissions and limitations # under the License. +import warnings + class Client(object): def __init__(self, session): + warnings.warn( + 'keystoneclient.baseclient.Client is deprecated as of the 2.1.0 ' + 'release. It will be removed in future releases.', + DeprecationWarning) + self.session = session def request(self, url, method, **kwargs): diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py index cb910b6ef..44fda67fa 100644 --- a/keystoneclient/httpclient.py +++ b/keystoneclient/httpclient.py @@ -379,7 +379,7 @@ class HTTPClient(baseclient.Client, base.BaseAuthPlugin): session = client_session.Session._construct(kwargs) session.auth = self - super(HTTPClient, self).__init__(session=session) + self.session = session self.domain = '' self.debug_log = debug