-
Notifications
You must be signed in to change notification settings - Fork 15
Switch the Python shebang to use Python3 on XS 8.4 as well, remove Python 2 tests #155
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
Switch the Python shebang to use Python3 on XS 8.4 as well, remove Python 2 tests #155
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.
Pull Request Overview
This PR transitions the xen-bugtool project from supporting both Python 2.7 and Python 3 to Python 3.6+ only, targeting deployment on XenServer 8.4 and later versions.
Key changes:
- Updates the main script shebang to use Python 3
- Removes Python 2 test infrastructure from CI workflows
- Updates project configuration and documentation to reflect Python 3.6+ requirement
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| xen-bugtool | Changed shebang from python to python3 |
| tests/integration/xenserver-config-systemd.sh | Updated default Python version and removed Python 2 references |
| tests/integration/sar-file-collection.test.sh | Updated default Python version and fixed typo |
| pyproject.toml | Updated Python version requirement from >=2.7 to >=3.6 with exclusions |
| doc/pre-commit.md | Updated documentation to reflect Python 3 focus |
| README.md | Rewrote FAQ sections to explain Python 3 migration and benefits |
| .github/workflows/main.yml | Removed Python 2 test job and updated container tests to use Python 3 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
37cea4b to
ce73e45
Compare
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Bernhard Kaindl <[email protected]>
ce73e45 to
dfdd718
Compare
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Split into PRs 157, 158, 159, and 160 |
Switch from using Python 2.7 to Python 3.6 on XenServer 8.4:
pyproject.tomlfrom >=2.7 to >=3.6Reviewer's Guide
File-Level Changes
xen-bugtoolREADME.mddoc/pre-commit.md.github/workflows/ci.ymlHow stable and well-tested is the Python3 support in
xen-bugtool?Is Python 2 support still needed?
No. As regular support for XenServer 8.2 has ended, and there are no plans to backport big changes to XenServer 8.2, Python 2 support is no longer needed.
Why was Python 2 support kept for so long?
In the case of backporting complex changes to XenServer 8.2, using Python 2 on XenServer 8.4 provided confidence that Python 2 support was still functioning.
But this aspect is no longer a concern since the end-of-life of XS 8.2.
What are the benefits of dropping Python 2 support?
Switching
xen-bugtoolto Python3 on XenServer 8.4 too should de-risk it frombreaking its Python2 support accidentally when making changes to
xen-bugtool:As developers now use Python3, the risk of accidentally breaking Python2 support
exists. With Python 2 support dropped, this risk is gone.
Also, more friendly Python3 features become available:
contextlibcontext managersuppressinstead of try-except or try-finally.f-stringsinstead of the older%formatting and "str1" + "str1", etc.pathlibinstead ofos.path