Azure Firewall Extension Using deprecated pkg_resources in pip package SetupTools
Describe the bug
Whenever any az network firewall commands are run a warning is displayed about using a deprecated API
Related command
az network firewall list -g $firewallRg
Errors
.azure\cliextensions\azure-firewall\azext_firewall\vendored_sdks_init_.py:6: 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. import('pkg_resources').declare_namespace(name)
Issue script & Debug output
cli.knack.cli: Command arguments: ['network', 'firewall', 'list', '-g', 'My-Firewall-Rg', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x0000027B251044A0>, <function OutputProducer.on_global_arguments at 0x0000027B25299800>, <function CLIQuery.on_global_arguments at 0x0000027B252EF740>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'network': ['azure.cli.command_modules.network', 'azure.cli.command_modules.privatedns', 'azext_firewall']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: network 2.419 120 480
cli.azure.cli.core: privatedns 0.109 14 60
cli.azure.cli.core: Total (2) 2.528 134 540
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: azure-firewall 0.221 21 67 C:\Users\user.azure\cliextensions\azure-firewall
cli.azure.cli.core: Total (1) 0.221 21 67
cli.azure.cli.core: Loaded 153 groups, 607 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : network firewall list
cli.azure.cli.core: Command table: network firewall list
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x0000027B276BD080>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\user.azure\commands\2025-11-07.16-24-49.network_firewall_list.36744.log'.
az_command_data_logger: command args: network firewall list -g {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.
Expected behavior
No warnings are shown
Environment Summary
azure-cli 2.79.0
core 2.79.0 telemetry 1.1.0
Extensions: account 0.2.5 azure-devops 1.0.2 azure-firewall 2.0.0 connectedmachine 2.0.0b2 scheduled-query 1.0.0b1 ssh 2.0.6
Dependencies: msal 1.34.0b1 azure-mgmt-resource 23.3.0
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe' Config directory 'C:\Users\user.azure' Extensions directory 'C:\Users\user.azure\cliextensions'
Python (Windows) 3.13.9 (tags/v3.13.9:8183fa5, Oct 14 2025, 14:09:13) [MSC v.1944 64 bit (AMD64)]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
I'm aware of similar tickets with the same error for other extensions. It looks like it needs to be fixed in all extensions that use setuptools
Thank you for opening this issue, we will look into it.