-
Notifications
You must be signed in to change notification settings - Fork 169
Fix deprecated module_utils imports (synchronize, mount) #690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix deprecated module_utils imports (synchronize, mount) #690
Conversation
|
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 29s |
640bd9d to
e9e6079
Compare
|
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 27s |
db3dc32 to
3fb8408
Compare
|
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 23s |
|
The remaining CI failures are pre-existing issues in files not modified by this PR (all showing Remaining errors (all pre-existing):
The |
These deprecated imports will be removed in ansible-core 2.24. Updated to use the new recommended import paths. - ansible.module_utils._text → ansible.module_utils.common.text.converters - ansible.module_utils.common._collections_compat → collections.abc Fixes ansible-collections#686 Co-authored-by: Cursor AI Signed-off-by: Pavel Bar <pbar@redhat.com>
These deprecated imports will be removed in ansible-core 2.24. Updated to use the new recommended import paths. - ansible.module_utils._text → ansible.module_utils.common.text.converters Related to ansible-collections#686 Co-authored-by: Cursor AI Signed-off-by: Pavel Bar <pbar@redhat.com>
Replace deprecated ansible.module_utils.six imports with Python 3 standard library equivalents to pass pylint sanity checks. synchronize.py: - ansible.module_utils.six.string_types → str - ansible.module_utils.six.moves.shlex_quote → shlex.quote mount.py: - ansible.module_utils.six.iteritems → dict.items() Related to ansible-collections#686 Co-authored-by: Cursor AI Signed-off-by: Pavel Bar <pbar@redhat.com>
Added changelog entry documenting the bugfixes for synchronize and mount modules' deprecated import issues. Related to ansible-collections#686 Co-authored-by: Cursor AI Signed-off-by: Pavel Bar <pbar@redhat.com>
3fb8408 to
c19d766
Compare
|
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 29s |
SUMMARY
Fixes deprecated
ansible.module_utilsimports that will be removed in ansible-core 2.24.This PR addresses deprecation warnings reported in #686 by updating import statements in the
synchronizeaction plugin andmountmodule to use the new recommended import paths.Deprecated imports replaced:
synchronize.py:
ansible.module_utils._text→ansible.module_utils.common.text.convertersansible.module_utils.common._collections_compat→collections.abcmount.py:
ansible.module_utils._text→ansible.module_utils.common.text.convertersFixes #686
ISSUE TYPE
COMPONENT NAME
synchronize, mount
ADDITIONAL INFORMATION
Testing performed:
ansible-core 2.20.0and Python 3.14synchronizeandmountmodules function correctly with no regressionsBefore (with deprecation warnings):
[DEPRECATION WARNING]: Importing
to_textfromansible.module_utils._textis deprecated.This feature will be removed from ansible-core version 2.24.
Use
ansible.module_utils.common.text.convertersinstead.[DEPRECATION WARNING]: The
ansible.module_utils.common._collections_compatmodule is deprecated.This feature will be removed from ansible-core version 2.24.
Use
collections.abcfrom the Python standard library instead.After (with fixes applied):
[No deprecation warnings]
Build completed successfully with no
ansible.module_utilsdeprecation warnings.