From 42e6700a717d8e07d24b5644d392dbed1d744f82 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 13 Mar 2019 16:45:52 -0400 Subject: [PATCH] Undeprecate force handlers (#53705) * removed deprecation notice, made comment instead * remove noisy deprecation * space --- changelogs/fragments/undeprecate_force_pc.yml | 2 ++ lib/ansible/playbook/play_context.py | 12 ++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/undeprecate_force_pc.yml diff --git a/changelogs/fragments/undeprecate_force_pc.yml b/changelogs/fragments/undeprecate_force_pc.yml new file mode 100644 index 00000000000..565fa7b7a28 --- /dev/null +++ b/changelogs/fragments/undeprecate_force_pc.yml @@ -0,0 +1,2 @@ +bugfixes: + - remove deprecation notice since validation makes it very noisy diff --git a/lib/ansible/playbook/play_context.py b/lib/ansible/playbook/play_context.py index 3f3e7d482e7..4159cb96f5e 100644 --- a/lib/ansible/playbook/play_context.py +++ b/lib/ansible/playbook/play_context.py @@ -127,10 +127,13 @@ class PlayContext(Base): _verbosity = FieldAttribute(isa='int', default=0) _only_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') _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): # 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 @@ -345,13 +348,6 @@ class PlayContext(Base): def set_become_plugin(self, 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): """ helper function to create privilege escalation commands """ display.deprecated(