Remove remaining ansible.module_utils.six import from kubectl connection plugin - #1197
Conversation
|
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 38s |
50d929c to
60e7bfa
Compare
|
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 32s |
ansible.module_utils.six is deprecated in ansible-core 2.21 and is scheduled for removal in 2.24. Every use of it in this collection has a direct Python 3 standard library equivalent, so switch to those.
60e7bfa to
6dd4c91
Compare
|
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 49s |
abikouo
left a comment
There was a problem hiding this comment.
LGTM. Just a minor remark regarding the PR link in the changelog fragment
Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com>
|
|
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 54s |
Backport to stable-5: 💚 backport PR created✅ Backport PR branch: Backported as #1199 🤖 @patchback |
Backport to stable-6: 💚 backport PR created✅ Backport PR branch: Backported as #1200 🤖 @patchback |
…ction plugin (#1197) (#1200) * Replace ansible.module_utils.six with Python stdlib equivalents ansible.module_utils.six is deprecated in ansible-core 2.21 and is scheduled for removal in 2.24. Every use of it in this collection has a direct Python 3 standard library equivalent, so switch to those. * Update changelogs/fragments/20260723-remove-module-utils-six.yaml --------- (cherry picked from commit dd4ca7a) Co-authored-by: Zhiwei Liang <zhiwei.liang@zliang.me> Co-authored-by: Bikouo Aubin <79859644+abikouo@users.noreply.github.com>



SUMMARY
#998 removed the
ansible.module_utils.siximports, butplugins/connection/kubectl.pywas missed and still imports the shim. This replaces it with the stdlib equivalent:On Python 3
six.moves.shlex_quoteis alreadyshlex.quote(the same function object), so there is no behaviour change at the single call site input_file(). The import is placed in the stdlib group to keeptox -e lintersclean.ansible.module_utils.sixis deprecated in ansible-core 2.21 and scheduled for removal in 2.24.ISSUE TYPE
COMPONENT NAME
plugins/connection/kubectl.py