From a2be8915ded56eef2f88ea9658d3aed237846251 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Tue, 25 Apr 2023 09:33:17 +0200 Subject: [PATCH] PlayIterator: remove deprecated methods (#80437) --- .../remove-play_iterator-deprecated-methods.yml | 2 ++ lib/ansible/executor/play_iterator.py | 15 --------------- test/sanity/ignore.txt | 1 - 3 files changed, 2 insertions(+), 16 deletions(-) create mode 100644 changelogs/fragments/remove-play_iterator-deprecated-methods.yml diff --git a/changelogs/fragments/remove-play_iterator-deprecated-methods.yml b/changelogs/fragments/remove-play_iterator-deprecated-methods.yml new file mode 100644 index 00000000000..792a6b482fa --- /dev/null +++ b/changelogs/fragments/remove-play_iterator-deprecated-methods.yml @@ -0,0 +1,2 @@ +removed_features: + - PlayIterator - remove deprecated ``cache_block_tasks`` and ``get_original_task`` methods diff --git a/lib/ansible/executor/play_iterator.py b/lib/ansible/executor/play_iterator.py index f36be5af52c..820db017fee 100644 --- a/lib/ansible/executor/play_iterator.py +++ b/lib/ansible/executor/play_iterator.py @@ -241,13 +241,6 @@ class PlayIterator: return self._host_states[host.name].copy() - def cache_block_tasks(self, block): - display.deprecated( - 'PlayIterator.cache_block_tasks is now noop due to the changes ' - 'in the way tasks are cached and is deprecated.', - version=2.16 - ) - def get_next_task_for_host(self, host, peek=False): display.debug("getting the next task for host %s" % host.name) @@ -584,14 +577,6 @@ class PlayIterator: return self.is_any_block_rescuing(state.always_child_state) return False - def get_original_task(self, host, task): - display.deprecated( - 'PlayIterator.get_original_task is now noop due to the changes ' - 'in the way tasks are cached and is deprecated.', - version=2.16 - ) - return (None, None) - def _insert_tasks_into_state(self, state, task_list): # if we've failed at all, or if the task list is empty, just return the current state if (state.fail_state != FailedStates.NONE and state.run_state == IteratingStates.TASKS) or not task_list: diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index 6d8e98de655..ed765a84152 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -240,7 +240,6 @@ test/units/utils/collection_loader/fixtures/collections_masked/ansible_collectio test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/testns/__init__.py empty-init # testing that collections don't need inits test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/testns/testcoll/__init__.py empty-init # testing that collections don't need inits test/units/utils/collection_loader/test_collection_loader.py pylint:undefined-variable # magic runtime local var splatting -lib/ansible/executor/play_iterator.py pylint:ansible-deprecated-version lib/ansible/playbook/helpers.py pylint:ansible-deprecated-version lib/ansible/playbook/included_file.py pylint:ansible-deprecated-version lib/ansible/plugins/action/__init__.py pylint:ansible-deprecated-version