In Azure CLI source code, azure
and azure.cli
contain __init__.py
files calling pkgutil
#21911
Labels
Milestone
azure
and azure.cli
contain __init__.py
files calling pkgutil
#21911
In a virtual env which installs Azure CLI from source code, under
azure
andazure.cli
folders, there are__init__.py
files containing one line:These files make
azure
andazure.cli
normal (non-namespace) packages, preventing Python from lookup additional library folders, causing problems for extensions which installs their ownazure
andazure.mgmt
namespace packages, likedataprotection
(Azure/azure-cli-extensions#4562) andcommunication
.These
pkgutil
__init__.py
files was introduced by #14372 to comply with Azure SDK's packaging guideline, possibly in order to support both Python 2 and 3:https://packaging.python.org/guides/packaging-namespace-packages/
However, Python 2 support was dropped from Azure CLI long ago by #11363.
During packaging (whl, deb, etc), these
pkgutil
__init__.py
files are excluded usingazure-cli/src/azure-cli-core/setup.py
Line 81 in 83c11a4
Keeping these files seems unnecessary anymore.
References
azure
andazure.mgmt
still have__init__.py
files callingpkg_resources
#21910The text was updated successfully, but these errors were encountered: