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
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
..
_vendor Revert "ansible-test - Fix import test when vendoring." 2 years ago
cli Add support for importlib.resources (#78915) 1 year ago
collections Add support for importlib.resources (#78915) 1 year ago
compat Add support for importlib.resources (#78915) 1 year ago
config typos (#79377) 2 years ago
errors refactor and fixes for doc parsing (#77719) 2 years ago
executor Prevent stdio deadlock in forked children (#79522) 1 year ago
galaxy Add support for importlib.resources (#78915) 1 year ago
inventory ansible-test - Update sanity test requirements. (#78528) 2 years ago
module_utils fix role argument spec error for invalid suboptions (#76578) 1 year ago
modules systemd: ignore errors in daemon_reload and daemon_reexec when running in a chroot or with $SYSTEMD_OFFLINE==1 (#79643) 1 year ago
parsing Custom salt for ansible-vault encrypt (#79063) 2 years ago
playbook Always create new role (#78661) 1 year ago
plugins Add support for importlib.resources (#78915) 1 year ago
template Simplify AnsibleJ2Vars by using ChainMap for vars (#78713) 1 year ago
utils Add support for importlib.resources (#78915) 1 year ago
vars avoid roles exporting vars: (#69040) 2 years ago
__init__.py Require Jinja2 3.0.0 (#75881) 3 years ago
__main__.py Python 3.9 min for controller (#77566) 2 years ago
constants.py add ansible_name/ansible_aliases attrs to plugin objects (#78700) 2 years ago
context.py Remove collections compat from controller code. 2 years ago
keyword_desc.yml Fixed typo in keyword_desc.yml (#76280) 3 years ago
release.py Bump devel to 2.15.0.dev0 (#78817) 2 years ago