-
Notifications
You must be signed in to change notification settings - Fork 262
Updates for deprecated modules in Python 3.12 and Invalid escape sequence issues #2124
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
Conversation
- Replace distutils.version with packaging/distutils/custom fallback in WaagentLib.py - Replace imp module with importlib.util fallback in WAAgentUtil.py - Fix invalid escape sequences in HandlerUtil.py JSON processing - Add setuptools fallback for distutils removal in setup.py Resolves VMBackup extension failure on Debian 12 with Python 3.12. All changes maintain backward compatibility with older Python versions.
- Added conditional import for distro package - Implemented multi-tier fallback strategy in get_dist_info() - Enhanced error handling with proper logging - Maintains backward compatibility across all Python versions - Resolves AttributeError: module 'platform' has no attribute 'dist'
- Add try/except block for crypt import to handle Python 3.13+ where crypt module was removed - Update gen_password_hash() to gracefully handle missing crypt module - Add TODO comment for future cleanup of unused code in VMBackup extension - Maintains backward compatibility with older Python versions - Resolves import error while preserving all existing functionality
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.
please share the extension logs with the updated changes using older and latest python versions
|
Extension success status result logs are present in the work item in PR description (ADO: 34492797). Also the rpc names are there @arisettisanjana |
The tests were run to verify on py3.13 versions so, just wanted to be sure that we have tested these changes for backward compatibility i.e with lesser python versions |
I haven't tested specifically for lesser python versions. But code will pickup the imports and logic for lesser python versions wherever needed. |
ADO Task: 34492797
Fix Python 3.12 compatibility issues
Resolves VMBackup extension failure on Debian 12 with Python 3.12. All changes maintain backward compatibility with older Python versions.
Fix platform.dist() deprecation error for Python 3.8+
Fix Python 3.13+ compatibility: Handle deprecated crypt module import