Should msrestazure be required by azure-common?
See original GitHub issue- Package Name: azure-common
- Package Version: 1.1.27
- Operating System: Ubuntu 20.04.3
- Python Version: CPython 3.10.2
Describe the bug 👋 Hiyo! It looks like azure-common expects to have msrestazure installed:
and does not require msrestazure, or another package that requires msrestazure, as a dependency:
# pip show azure-common
Name: azure-common
Version: 1.1.27
Summary: Microsoft Azure Client Library for Python (Common)
Home-page: https://github.com/Azure/azure-sdk-for-python
Author: Microsoft Corporation
Author-email: azpysdkhelp@microsoft.com
License: MIT License
Location: /usr/local/lib/python3.10/site-packages
Requires:
Required-by: azure-mgmt-dns, azure-mgmt-trafficmanager
Should msrestazure be required by azure-common?
To Reproduce Steps to reproduce the behavior:
- Install azure-mgmt-dns, azure-mgmt-trafficmanager, and/or azure-common without separately installing msrestazure
- Do something that uses azure/common/credentials.py
Expected behavior Installing azure-common also installs packages azure-common requires.
Screenshots n/a
Additional context See also https://github.com/octodns/octodns-azure/issues/7 about the error I encountered.
I encountered this error trying to use OctoDNS’s azure_provider on a GitHub-hosted Actions runner:
Traceback (most recent call last):
59
File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/azure/common/credentials.py", line 116, in <module>
60
from msrestazure.azure_active_directory import (
61
ModuleNotFoundError: No module named 'msrestazure'
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
msrest and msrestazure dependencies not installed · Issue #644
Because msrest(azure) in a sub-dependencies of an azure-common ... So, you can install msrestazure this way (assuming you have sudo access):
Read more >azure-common - PyPI
This is the Microsoft Azure common code. This package provides shared code by the Azure packages. If you are looking to install the...
Read more >azure-common - Python Package Health Analysis - Snyk
All security vulnerabilities belong to production dependencies of direct and indirect packages. License: MIT. Security Policy: Yes ...
Read more >credentials Module - azure-common - Microsoft Learn
For compatible azure-cli-core version (< 2.20.0), credentials will be the "az login" ... Default subscription ID is either the only one you have,...
Read more >python - from msrestazure.azure_active_directory import ...
pip install msrestazure. After the installation of msrestazure python library, the above error will be solved.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@solvaholic Thanks for reaching out.
It is by design that azure-common does not explicitly require msrestazure.
The reason is azure.common.credentials is not always used by SDK libraries. (e.g. all track 2 libraries do not use it).
So the design is it is on the libraries who need azure.common.credentials to add requirement on msrestazure.
Thanks.
@xiangyan99 it’s not exactly Azure Core but there’s not someone assigned for “azure-common”.