You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/lib/ansible/utils
Matt Martz 56d142350d
Add support for importlib.resources (#78915)
* Add support for importlib.resources

* Remove the importlib.resources imports

* return the correct data

* Some code comments, and re-order for consistency

* Disallow traversing packages below an individual collection

* Add a traversable class for namespaces

* Re-use variable

* Utilize itertools.chain.from_iterable

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* Simplify logic to check for packages from ansible loaders

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

* Just a generator expression, instead of a generator

* docstrings

* Add comment about find_spec for our namespaces

* Add some initial unit tests for importlib.resources

* normalize

* Utilize importlib.resources for listing collections

* collections_path is already in config, just use config

* install uses a different default for collections_path

* Remove unused import

* Remove duplicate __truediv__

* Bring back TraversableResources

* Apply some small suggestions from code review

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

* Remove cross contamination between plugin loader code and CLI code

* Remove unused import

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
1 year ago
..
collection_loader Add support for importlib.resources (#78915) 1 year ago
__init__.py limit extensions for files in group/host_vars dir 9 years ago
_junit_xml.py Type hint fixes. 2 years ago
cmd_functions.py Remove more Python 2.x compatibility code from controller. (#77320) 2 years ago
color.py Allow restricting config values to enumerated list (#73162) 3 years ago
context_objects.py Remove collections compat from controller code. 2 years ago
display.py Prevent stdio deadlock in forked children (#79522) 1 year ago
encrypt.py Deprecate use of Python crypt (#78257) 2 years ago
fqcn.py Fix missing ansible.builtin FQCNs in hardcoded action names (#71824) 4 years ago
galaxy.py Support ignoring of certificates for ansible-galaxy during SCM cloning (#67616) 2 years ago
hashing.py Remove obsolete Python 2.x compat code. 2 years ago
helpers.py preserve same order as inventory manager when using host lookup (#55331) 5 years ago
jsonrpc.py Type hint fixes. 2 years ago
listify.py listify_lookup_plugin_terms deprecate dataloader (#78244) 2 years ago
lock.py Allow callbacks from forks (#70501) 4 years ago
multiprocessing.py Remove obsolete Python 2.x compat code. 2 years ago
native_jinja.py Force template module to use non-native Jinja2 (#68560) 4 years ago
path.py expand ansible-doc coverage (#74963) 2 years ago
plugin_docs.py plugin docs: look at all potential sidecar docs extensions before giving up (#78788) 2 years ago
py3compat.py Remove collections compat from controller code. 2 years ago
sentinel.py Fieldattribute inheritance with defaults (#50891) 5 years ago
shlex.py Update module_utils.six to latest (#22855) 7 years ago
singleton.py Add a Singleton metaclass, use it with Display (#48935) 6 years ago
ssh_functions.py Type hint fixes. 2 years ago
unicode.py Code cleanup to prepare for pylint update. (#75475) 3 years ago
unsafe_proxy.py Remove deprecated UnsafeProxy (#77455) 2 years ago
vars.py slight var loading optimization (#78835) 2 years ago
version.py Vendor `distutils.version` (#74644) 3 years ago