[PR #6644/494909ab backport][stable-7] MH mh/mixins/deps.py: prevent deprecation warning when no deps are specified (#6653)

MH mh/mixins/deps.py: prevent deprecation warning when no deps are specified (#6644)

* MH mh/mixins/deps.py: prevent deprecation warning when no deps are specified

* rollback empty "patch" on license markers to prevent test error

* disable test in ansible 2.12

* add changelog frag

(cherry picked from commit 494909aba5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2023-06-09 13:28:30 +02:00 committed by GitHub
commit 1f518751a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 3 deletions

View file

@ -52,6 +52,8 @@ class DependencyMixin(ModuleHelperBase):
return cls._dependencies[-1]
def fail_on_missing_deps(self):
if not self._dependencies:
return
self.module.deprecate(
'The DependencyMixin is being deprecated. '
'Modules should use community.general.plugins.module_utils.deps instead.',