{Packaging} Drop the vestigial setuptools runtime dependency - #34010
Open
aryasadeghi1 wants to merge 2 commits into
Open
{Packaging} Drop the vestigial setuptools runtime dependency#34010aryasadeghi1 wants to merge 2 commits into
aryasadeghi1 wants to merge 2 commits into
Conversation
azure-cli declared `setuptools` in install_requires, but nothing in the shipped
code imports it or pkg_resources. It is also absent from all three
requirements.py3.*.txt closures, so the deb, homebrew and standalone artifacts
never installed it - only `pip install azure-cli` did.
Verified by reproducing the shipped install (local packages --no-deps, then the
pinned closure), removing setuptools entirely, and running the CLI:
setuptools: ABSENT pkg_resources: ABSENT
az --version -> 2.90.0
az self-test -> Commands loaded OK. Help loaded OK. OK
This is what holds the setuptools<81 cap: setuptools 82 removes pkg_resources.
The caps are left in place here and will be audited individually, since not all
of them are about azure-cli - scripts/release/homebrew/docker/requirements.txt
must keep its pin because homebrew-pypi-poet uses pkg_resources.
microsoft-github-policy-service
Bot
requested review from
Yu Chen (jsntcy),
ZelinWang (wangzelin007) and
Yong Zhang (yonzhan)
August 30, 2026 06:04
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the setuptools runtime dependency from the azure-cli package’s install_requires, aligning the PyPI install behavior with other distribution artifacts and reducing exposure to pkg_resources removals in newer setuptools versions.
Changes:
- Dropped
setuptoolsfromsrc/azure-cli/setup.pyDEPENDENCIES(runtime requirements forpip install azure-cli).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
|
Packaging |
Yong Zhang (yonzhan)
requested review from
mansoor sarfraz (msarfraz) and
Naga Nandyala (naga-nandyala)
August 30, 2026 09:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 PR Validation — ️✔️ All clear
azure-cli declared
setuptoolsin install_requires, but nothing in the shipped code imports it or pkg_resources. It is also absent from all three requirements.py3.*.txt closures, so the deb, homebrew and standalone artifacts never installed it - onlypip install azure-clidid.This is what holds the setuptools<81 cap: setuptools 82 removes pkg_resources. The caps are left in place here and will be audited individually, since not all of them are about azure-cli,
scripts/release/homebrew/docker/requirements.txtmust keep its pin becausehomebrew-pypi-poetusespkg_resourcesRelated command
Description
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.