-
Notifications
You must be signed in to change notification settings - Fork 1.6k
UserWarning: pkg_resources is deprecated as an API #8953
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botNetwork - BastionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.customer-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
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botNetwork - BastionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.customer-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
Describe the bug
When running
az network bastion sshcommands we recieve/.azure/cliextensions/bastion/azext_bastion/custom.py:107: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
from pkg_resources import parse_version
This warning breaks our tooling, can the warning be silenced or the pkg_resource dependency be removed?
We've tried
Ref (was fixed on other parts of az cli):
Azure/azure-cli#31591
Versions:
azure-cli 2.75.0
core 2.75.0
telemetry 1.1.0
Extensions:
azure-devops 1.0.2
bastion 1.4.1
ssh 2.0.6
Related command
az network bastion sshErrors
UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
from pkg_resources import parse_version
Issue script & Debug output
UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
from pkg_resources import parse_version
Expected behavior
No Warning should be produced, the shell should be shown
Environment Summary
azure-cli 2.75.0
core 2.75.0
telemetry 1.1.0
Extensions:
azure-devops 1.0.2
bastion 1.4.1
ssh 2.0.6
Dependencies:
msal 1.33.0b1
azure-mgmt-resource 23.3.0
Python location '/opt/az/bin/python3'
Config directory '/home/alex/.azure'
Extensions directory '/home/alex/.azure/cliextensions'
Python (Linux) 3.12.10 (main, Jun 24 2025, 10:15:05) [GCC 11.4.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response