-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Use vendored copy of distutils.version #3984
Use vendored copy of distutils.version #3984
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, only thing I'll ask if this was tested and definitely solves the issue for too old 2.9/2.10 versions?
I did test it in community.docker with old Ansible versions; here it was only tested with the latest stable-x branches. |
Backport to stable-3: 💚 backport PR created✅ Backport PR branch: Backported as #3986 🤖 @patchback |
(cherry picked from commit cf7a333)
Backport to stable-4: 💚 backport PR created✅ Backport PR branch: Backported as #3987 🤖 @patchback |
(cherry picked from commit cf7a333)
@briantist thanks for reviewing this! |
(cherry picked from commit cf7a333) Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit cf7a333) Co-authored-by: Felix Fontein <[email protected]>
except ImportError as exc: | ||
msg = 'To use this plugin or module with ansible-core < 2.11, you need to use Python < 3.12 with distutils.version present' | ||
raise_from(ImportError(msg), exc) | ||
# Once we drop support for Ansible 2.9 and ansible-base 2.10, we can |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should have been
# Once we drop support for Ansible 2.9 and ansible-base 2.10, we can
# Once we drop support for Ansible 2.9, ansible-base 2.10, and ansible-core 2.11, we can
Fixing in follow-up PR #3993.
SUMMARY
Closes #3979. This fixes the issue the current fix (#3936) had for Ansible 2.9 before 2.9.20, and ansible-base 2.10 before 2.10.8.
ISSUE TYPE
COMPONENT NAME
plugins/module_util/version.py