From bcd9c4f048d5574ef0b0c927d8832d48cd08c7cc Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Wed, 12 Jun 2019 14:07:15 -0500 Subject: [PATCH] Make RequestContext(instance_lock_checked) fail The instance_lock_checked kwarg was added to RequestContext in [1], no longer used in Nova since [2], and deprecated with a warning in [3]. This commit removes all handling of this kwarg, which will cause using it to blow up with a TypeError in the super().__init__. [1] I1127e31d86a061a93a64ee1eb4a4d900d8bf49b5 [2] Ic18017a16c5bffee85a43db65ff17283599a27ba [3] Ib0b23a47c2e833073108af6700b16f8026631a83 Change-Id: Ie5f5a0ae018ce601c588a466399515159d8f58c0 --- nova/context.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/nova/context.py b/nova/context.py index 4901f1de1bf5..51ef6ef52990 100644 --- a/nova/context.py +++ b/nova/context.py @@ -19,7 +19,6 @@ from contextlib import contextmanager import copy -import warnings import eventlet.queue import eventlet.timeout @@ -97,9 +96,6 @@ class RequestContext(context.RequestContext): :param overwrite: Set to False to ensure that the greenthread local copy of the index is not overwritten. - :param instance_lock_checked: This is not used and will be removed - in a future release. - :param user_auth_plugin: The auth plugin for the current request's authentication data. """ @@ -108,12 +104,6 @@ class RequestContext(context.RequestContext): if project_id: kwargs['project_id'] = project_id - if kwargs.pop('instance_lock_checked', None) is not None: - # TODO(mriedem): Let this be a hard failure in 19.0.0 (S). - warnings.warn("The 'instance_lock_checked' kwarg to " - "nova.context.RequestContext is no longer used and " - "will be removed in a future version.") - super(RequestContext, self).__init__(is_admin=is_admin, **kwargs) self.read_deleted = read_deleted