-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Git provider
Azure
System Info
GPT-5.2, Azure DevOps pipeline, building from source (main)
Bug details
When running pr agent from source (checkout main branch, pip install .), latest setuptools (82.0.0) gets pulled. This has made pkg_resources completely obsolete as per https://setuptools.pypa.io/en/stable/history.html
End result is that imports in
pr-agent/pr_agent/git_providers/azuredevops_provider.py
Lines 20 to 30 in 58edfba
| try: | |
| # noinspection PyUnresolvedReferences | |
| from azure.devops.connection import Connection | |
| # noinspection PyUnresolvedReferences | |
| from azure.devops.released.git import (Comment, CommentThread, GitPullRequest, GitVersionDescriptor, GitClient, CommentThreadContext, CommentPosition) | |
| from azure.devops.released.work_item_tracking import WorkItemTrackingClient | |
| # noinspection PyUnresolvedReferences | |
| from azure.identity import DefaultAzureCredential | |
| from msrest.authentication import BasicAuthentication | |
| except ImportError: | |
| AZURE_DEVOPS_AVAILABLE = False |
azure-devops package still relies on pkg_resources, if you pull it locally, you will see:
File "<SNIP>/.venv/lib/python3.12/site-packages/azure/__init__.py", line 5, in <module>
import pkg_resources
File "<SNIP>/Applications/PyCharm Professional Edition.app/Contents/plugins/python-ce/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pkg_resources'
Since upstream azure package is stuck in limbo the only recourse is to pin setuptools version to 81.0.0 and make it an explicit import.
EDIT: Upstream fix is available, see comment below and linked PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels