Support for azure-mgmt-recoveryservicesbackup v4.0+ #1469
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
In newer versions of the library, the models module got split between two sub-packages,
passivestamp
andactivestamp
. All models used are part of theactivestamp
module, so conditionally import from there if the newer version is installed.ISSUE TYPE
COMPONENT NAME
azure_rm_common
ADDITIONAL INFORMATION
I looked into this because I tried pip-installing the requirements-azure.txt file, which pins the azure-cli-core package to 2.34. I'm using Fedora and it ships with Python 3.12, which dropped distutils. I wanted to see if the new version of azure-cli-core stopped using distutils, so I updated everything and this was the only incompatibility I noticed.
The newer azure-cli-core doesn't help with the missing distutils, so for Python 3.12+ setuptools also needs to be installed (which now provides distutils).