Azure / Azure/azure-cli

azure-cli/setup.py depends on PyGithub v1

Open
#27,873 9 comments 0 reactions 2 assignees Claimed by @bebound View on GitHub
act-platform-engineering-squad Auto-Assign Azure CLI Team customer-reported feature-request Installation
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 10h
Merged PRs (30d)
64

Description

### Describe the bug

azure-cli requires to import PyGithub v1 which prevents others to install PyGithub v2.

https://github.com/Azure/azure-cli/blob/dev/src/azure-cli/setup.py#L143C6-L143C14

### Related command

N/A

### Errors

N/A

### Issue script & Debug output

N/A

### Expected behavior

We should be able to install the latest version of PyGithub.

### Environment Summary

```
> az --version
azure-cli 2.54.0

core 2.54.0
telemetry 1.1.0

Dependencies:
msal 1.25.0
azure-mgmt-resource 23.1.0b2

Python location '/Users/stephane/.pyenv/versions/3.11.6/bin/python'
Extensions directory '/Users/stephane/.azure/cliextensions'

Python (Darwin) 3.11.6 (main, Oct 6 2023, 15:56:03) [Clang 15.0.0 (clang-1500.0.40.1)]
```

### Additional context

While the preferred method to install the az cli is the official method with the dedicated interepretter and copy of the azure SDK this is not ok for folks that work with ephemeral containers due to the extremely large size of the Azure SDK. Having a duplicate copy of the azure SDK is a big problem that is tracked in other long open issues. We cannot use the official method and the strict import tree of the azure CLI is causing conflicts.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.