ansible-collections / ansible-collections/google.cloud
Deprecated ansible.module_utils._text imports in gcp_compute inventory / gcp_utils
- Dominant language
- Python
- Stars
- 105
- Forks
- 144
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 4
Description
##### SUMMARY
`plugins/inventory/gcp_compute.py`, `plugins/module_utils/gcp_utils.py`, and `plugins/modules/gcp_iam_service_account_key.py` import `to_text`/`to_native` from `ansible.module_utils._text`, deprecated since ansible-core 2.20, removal scheduled for 2.24.
##### ISSUE TYPE
Bug Report
##### COMPONENT NAME
plugins/inventory/gcp_compute.py, plugins/module_utils/gcp_utils.py, plugins/modules/gcp_iam_service_account_key.py
##### ANSIBLE VERSION
```console
ansible-core 2.20.5
```
##### COLLECTION VERSION
```console
google.cloud 1.14.0
```
##### STEPS TO REPRODUCE
Use the `gcp_compute` inventory plugin, or the `gcp_iam_service_account_key` module, with default deprecation warnings enabled.
##### EXPECTED RESULTS
No deprecation warning.
##### ACTUAL RESULTS
```
[DEPRECATION WARNING]: Importing 'to_text' from 'ansible.module_utils._text' is deprecated. This feature will be removed from ansible-core version 2.24. Use ansible.module_utils.common.text.converters instead.
```
Contributor guide
Research direction
Start with the imports in plugins/inventory/gcp_compute.py, plugins/module_utils/gcp_utils.py, and plugins/modules/gcp_iam_service_account_key.py. Reproduce the inventory or module run with ansible-core 2.20.5 and deprecation warnings enabled, then verify those paths no longer emit the deprecated _text import warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gcp, python
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100