-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
DevOpscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
- Package Name: all when also used with azure-devops
- Package Version: any
- Operating System: Windows 11
- Python Version: Python 3.12
Describe the bug
The azure-devops has a azure/__init__.py
that does an import pkg_resources
despite not declaring a dependency on setuptools.
If this is installed, all import azure
breaks, even other packages, unless setuptools is also installed independently.
I reported the issue in microsoft/azure-devops-python-api#470 but since that repository doesn't have much activity and the issue is impacting the use of other azure packages I wanted to also post it here.
To Reproduce
Steps to reproduce the behavior:
- Install Python 3.12.
- Create a venv. On one of my machines it broke even on the main install, but it will definitely break in a venv thanks to Remove bundled setuptools python/cpython#95299
- Install azure-devops along with any other azure-sdk-for-python package
- Try to import
Expected behavior
Import should succeed
Screenshots
>>> import azure.cosmosdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\rejett\Documents\src\env\Lib\site-packages\azure\__init__.py", line 5, in <module>
import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
Additional context
This might be related to azure-devops still using the legacy 'setup.py install' method microsoft/azure-devops-python-api#441
kdestin and bluenote10
Metadata
Metadata
Assignees
Labels
DevOpscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that