mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
MH VarsMixin deprecation (#6649)
* MH VarsMixin deprecation * add changelog frag
This commit is contained in:
parent
621bedf751
commit
994f08b37a
2 changed files with 20 additions and 0 deletions
2
changelogs/fragments/6649-varsmixin-deprecation.yml
Normal file
2
changelogs/fragments/6649-varsmixin-deprecation.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
deprecated_features:
|
||||
- MH VarsMixin module utils - deprecates ``VarsMixin`` and supporting classes in favor of plain ``vardict`` module util (https://github.com/ansible-collections/community.general/pull/6649).
|
|
@ -11,6 +11,13 @@ import copy
|
|||
|
||||
|
||||
class VarMeta(object):
|
||||
"""
|
||||
DEPRECATION WARNING
|
||||
|
||||
This class is deprecated and will be removed in community.general 10.0.0
|
||||
Modules should use the VarDict from plugins/module_utils/vardict.py instead.
|
||||
"""
|
||||
|
||||
NOTHING = object()
|
||||
|
||||
def __init__(self, diff=False, output=True, change=None, fact=False):
|
||||
|
@ -60,6 +67,12 @@ class VarMeta(object):
|
|||
|
||||
|
||||
class VarDict(object):
|
||||
"""
|
||||
DEPRECATION WARNING
|
||||
|
||||
This class is deprecated and will be removed in community.general 10.0.0
|
||||
Modules should use the VarDict from plugins/module_utils/vardict.py instead.
|
||||
"""
|
||||
def __init__(self):
|
||||
self._data = dict()
|
||||
self._meta = dict()
|
||||
|
@ -123,7 +136,12 @@ class VarDict(object):
|
|||
|
||||
|
||||
class VarsMixin(object):
|
||||
"""
|
||||
DEPRECATION WARNING
|
||||
|
||||
This class is deprecated and will be removed in community.general 10.0.0
|
||||
Modules should use the VarDict from plugins/module_utils/vardict.py instead.
|
||||
"""
|
||||
def __init__(self, module=None):
|
||||
self.vars = VarDict()
|
||||
super(VarsMixin, self).__init__(module)
|
||||
|
|
Loading…
Reference in a new issue