Skip to content
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

Merged

Conversation

felixfontein
Copy link
Collaborator

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
  • Bugfix Pull Request
COMPONENT NAME

plugins/module_util/version.py

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module_utils module_utils plugins plugin (any type) labels Jan 5, 2022
Copy link
Contributor

@briantist briantist left a 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?

@felixfontein
Copy link
Collaborator Author

I did test it in community.docker with old Ansible versions; here it was only tested with the latest stable-x branches.

@patchback
Copy link

patchback bot commented Jan 5, 2022

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/cf7a33356cf746746f5649fe2f3450985e9db16a/pr-3984

Backported as #3986

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein deleted the distutils-again branch January 5, 2022 20:19
patchback bot pushed a commit that referenced this pull request Jan 5, 2022
@patchback
Copy link

patchback bot commented Jan 5, 2022

Backport to stable-4: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4/cf7a33356cf746746f5649fe2f3450985e9db16a/pr-3984

Backported as #3987

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator Author

@briantist thanks for reviewing this!

felixfontein added a commit that referenced this pull request Jan 5, 2022
(cherry picked from commit cf7a333)

Co-authored-by: Felix Fontein <felix@fontein.de>
felixfontein added a commit that referenced this pull request Jan 5, 2022
(cherry picked from commit cf7a333)

Co-authored-by: Felix Fontein <felix@fontein.de>
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
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module_utils module_utils plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants