ansible-doc and validate-modules: remove underscore deprecation handling for collections (#79362)

* Remove underscore deprecation handling for collections.

* Also consider ansible.legacy.
pull/79218/head
Felix Fontein 2 years ago committed by GitHub
parent 66cc952b49
commit 1705ec98cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,6 @@
breaking_changes:
- "ansible-doc - no longer treat plugins in collections whose name starts with ``_`` as deprecated
(https://github.com/ansible/ansible/pull/79217)."
- "ansible-test sanity - previously plugins and modules in collections whose name started with ``_``
were treated as deprecated, even when they were not marked as deprecated in ``meta/runtime.yml``.
This is no longer the case (https://github.com/ansible/ansible/pull/79362)."

@ -495,7 +495,9 @@ class DocCLI(CLI, RoleMixin):
desc = desc[:linelimit] + '...'
pbreak = plugin.split('.')
if pbreak[-1].startswith('_'): # Handle deprecated # TODO: add mark for deprecated collection plugins
# TODO: add mark for deprecated collection plugins
if pbreak[-1].startswith('_') and plugin.startswith(('ansible.builtin.', 'ansible.legacy.')):
# Handle deprecated ansible.builtin plugins
pbreak[-1] = pbreak[-1][1:]
plugin = '.'.join(pbreak)
deprecated.append("%-*s %-*.*s" % (displace, plugin, linelimit, len(desc), desc))

@ -794,7 +794,7 @@ def author(value):
def doc_schema(module_name, for_collection=False, deprecated_module=False, plugin_type='module'):
if module_name.startswith('_'):
if module_name.startswith('_') and not for_collection:
module_name = module_name[1:]
deprecated_module = True
if for_collection is False and plugin_type == 'connection' and module_name == 'paramiko_ssh':

Loading…
Cancel
Save