##### SUMMARY

There are several options for resolving this:

* Vendoring a second copy of `six` that implements `find_spec` and `exec_module`, and using it for newer Pythons.
* Vendoring the latest version of `six` and updating it as needed to work back through Python 2.6.

See also: https://github.com/ansible/ansible/issues/72952

##### ISSUE TYPE

Feature Idea

##### COMPONENT NAME

lib/ansible/module_utils/six/__init__.py
"""Capture sys.stdout and sys.stderr.
        :type capture: Capture
        """
        old_stdout = sys.stdout
        old_stderr = sys.stderr
        sys.stdout = capture.stdout
        sys.stderr = capture.stderr
        
        for module in sys.modules.values():
            try:
                
                module.__warningregistry__.clear()
            except AttributeError:
                pass
        with warnings.catch_warnings():
            warnings.simplefilter('error')
            if sys.version_info[0] == 2:
                warnings.filterwarnings(
                    "ignore",
                    "Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography,"
                    " and will be removed in a future release.")
                warnings.filterwarnings(
                    "ignore",
                    "Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography,"
                    " and will be removed in the next release.")
            if sys.version_info[:2] == (3, 5):