From a4cb35b7c518bf1a6ab033272a497e5902222ca3 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Wed, 29 Aug 2018 14:55:01 -0500 Subject: [PATCH] Remove support for overriding the class name Nothing in Salt uses this now. --- salt/utils/context.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/salt/utils/context.py b/salt/utils/context.py index cb80c0cfca..bb088f465b 100644 --- a/salt/utils/context.py +++ b/salt/utils/context.py @@ -203,10 +203,14 @@ class NamespacedDictWrapper(collections.MutableMapping, dict): self.pre_keys = (pre_keys,) else: self.pre_keys = pre_keys - if override_name: - self.__class__.__module__ = 'salt' - # __name__ can't be assigned a unicode - self.__class__.__name__ = str(override_name) # future lint: disable=blacklisted-function + if override_name is not None: + import salt.utils.versions + salt.utils.versions.warn_until( + 'Neon', + 'Overriding the class name is no longer supported. Please ' + 'remove the override_name argument before it is removed in ' + 'Salt Sodium.' + ) super(NamespacedDictWrapper, self).__init__(self._dict()) def _dict(self):