Undeprecate force handlers (#53705)

* removed deprecation notice, made comment instead

* remove noisy deprecation

* space
This commit is contained in:
Brian Coca 2019-03-13 16:45:52 -04:00 committed by Matt Martz
parent f97a593da5
commit 42e6700a71
2 changed files with 6 additions and 8 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- remove deprecation notice since validation makes it very noisy

View file

@ -127,10 +127,13 @@ class PlayContext(Base):
_verbosity = FieldAttribute(isa='int', default=0) _verbosity = FieldAttribute(isa='int', default=0)
_only_tags = FieldAttribute(isa='set', default=set) _only_tags = FieldAttribute(isa='set', default=set)
_skip_tags = FieldAttribute(isa='set', default=set) _skip_tags = FieldAttribute(isa='set', default=set)
_force_handlers = FieldAttribute(isa='bool', default=False)
_start_at_task = FieldAttribute(isa='string') _start_at_task = FieldAttribute(isa='string')
_step = FieldAttribute(isa='bool', default=False) _step = FieldAttribute(isa='bool', default=False)
# "PlayContext.force_handlers should not be used, the calling code should be using play itself instead"
_force_handlers = FieldAttribute(isa='bool', default=False)
def __init__(self, play=None, passwords=None, connection_lockfd=None): def __init__(self, play=None, passwords=None, connection_lockfd=None):
# Note: play is really not optional. The only time it could be omitted is when we create # Note: play is really not optional. The only time it could be omitted is when we create
# a PlayContext just so we can invoke its deserialize method to load it from a serialized # a PlayContext just so we can invoke its deserialize method to load it from a serialized
@ -345,13 +348,6 @@ class PlayContext(Base):
def set_become_plugin(self, plugin): def set_become_plugin(self, plugin):
self._become_plugin = plugin self._become_plugin = plugin
def _get_attr_force_handlers(self):
display.deprecated(
"PlayContext.force_handlers should not be used, the calling code should be using play itself instead",
version="2.19"
)
return self._attributes.get('force_handlers', None)
def make_become_cmd(self, cmd, executable=None): def make_become_cmd(self, cmd, executable=None):
""" helper function to create privilege escalation commands """ """ helper function to create privilege escalation commands """
display.deprecated( display.deprecated(