From 14900dd683ba49f085456101118dd12105d2d98e Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 18 Oct 2015 21:55:51 +0200 Subject: [PATCH] httpclient: remove unused debug kwargs This has been deprecated for a while and is now not even used anymore. Indeed, nothing in the code use the attribute keystoneclient.httpclient.HTTPClient.debug_log. Furthermore, removing the debug keyword argument from the signature of keystoneclient.httpclient.HTTPClient.__init__ has no impact since this signature include **kwargs, which in Python means that you it will accept any keyword-argument. Any code that would still pass the debug argument to that method will therefore not notice any difference and will not fail. Change-Id: Iaae4febf3f13f6a66ad0e792dc2347b4699f65c0 --- keystoneclient/httpclient.py | 6 +----- keystoneclient/tests/unit/test_discovery.py | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py index 59d5af4dc..1a5383bff 100644 --- a/keystoneclient/httpclient.py +++ b/keystoneclient/httpclient.py @@ -196,9 +196,6 @@ class HTTPClient(baseclient.Client, base.BaseAuthPlugin): :param string original_ip: This argument is deprecated as of the 1.7.0 release in favor of session and may be removed in the 2.0.0 release. (optional) - :param boolean debug: This argument is deprecated as of the 1.7.0 release - in favor of logging configuration and may be removed - in the 2.0.0 release. (optional) :param dict auth_ref: To allow for consumers of the client to manage their own caching strategy, you may initialize a client with a previously captured auth_reference (token). If @@ -249,7 +246,7 @@ class HTTPClient(baseclient.Client, base.BaseAuthPlugin): @positional(enforcement=positional.WARN) def __init__(self, username=None, tenant_id=None, tenant_name=None, password=None, auth_url=None, region_name=None, endpoint=None, - token=None, debug=False, auth_ref=None, use_keyring=False, + token=None, auth_ref=None, use_keyring=False, force_new_token=False, stale_duration=None, user_id=None, user_domain_id=None, user_domain_name=None, domain_id=None, domain_name=None, project_id=None, project_name=None, @@ -378,7 +375,6 @@ class HTTPClient(baseclient.Client, base.BaseAuthPlugin): self.session = session self.domain = '' - self.debug_log = debug # NOTE(jamielennox): unfortunately we can't just use **kwargs here as # it would incompatibly limit the kwargs that can be passed to __init__ diff --git a/keystoneclient/tests/unit/test_discovery.py b/keystoneclient/tests/unit/test_discovery.py index 7b7ab53ac..dc3110f17 100644 --- a/keystoneclient/tests/unit/test_discovery.py +++ b/keystoneclient/tests/unit/test_discovery.py @@ -499,7 +499,6 @@ class ClientDiscoveryTests(utils.TestCase): client = disc.create_client(debug=True, password='bar') self.assertIsInstance(client, v3_client.Client) - self.assertTrue(client.debug_log) self.assertFalse(disc._client_kwargs['debug']) self.assertEqual(client.username, 'foo') self.assertEqual(client.password, 'bar')