os icon indicating copy to clipboard operation
os copied to clipboard

Azure CLI (az) shows Python compatibility warnings when run with Python 3.13

Open debasishbsws opened this issue 6 months ago • 2 comments

Issue Based on PR: https://github.com/wolfi-dev/os/pull/46866

Description:

The Azure CLI package (az command) is generating multiple warnings when executed in the wolfi-base container with Python 3.13. These warnings indicate potential compatibility issues that should be addressed.

Current Behavior

Running az --help in the wolfi-base container produces several warnings:

/ # az --help
/usr/lib/python3.13/site-packages/azure/batch/models/_models.py:10220: SyntaxWarning: invalid escape sequence '\*'
  **\*.txt matches any file that does not start in '.' and ends with .txt in the Task working
/usr/lib/python3.13/site-packages/azure/cli/core/aaz/_command.py:132: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior
  if self.AZ_PREVIEW_INFO:
/usr/lib/python3.13/site-packages/azure/cli/core/aaz/_command.py:133: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior
  self.preview_info = self.AZ_PREVIEW_INFO(cli_ctx=self.cli_ctx)
/usr/lib/python3.13/site-packages/azure/cli/core/aaz/_command.py:50: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior
  if self.AZ_PREVIEW_INFO:
/usr/lib/python3.13/site-packages/azure/cli/core/aaz/_command.py:51: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior
  self.group_kwargs['preview_info'] = self.AZ_PREVIEW_INFO(cli_ctx=self.cli_ctx)

Root Cause

The warnings appear to be related to running Azure CLI with Python 3.13, which may not be fully supported according to the Azure CLI support lifecycle documentation. It says v3.8 to v3.11

Expected Behavior

The az command should run without generating compatibility warnings.

Additional Context

The Azure CLI upstream project is located at: https://github.com/Azure/azure-cli According to upstream documentation, Azure CLI depends on Python version 3.8 or above This issue affects user experience when using the Azure CLI in Wolfi environments

Package Naming Considerations

  • Command vs Package Name Mismatch: The executable command is az, but the actual project name is azure-cli (https://github.com/Azure/azure-cli), which can cause confusion for users trying to find or reference the package
  • Discoverability Issues: Users searching for "azure-cli" may not easily find the az package, and vice versa, leading to difficulty in package discovery and installation

debasishbsws avatar Jun 09 '25 06:06 debasishbsws

hey @debasishbsws Can I take this up ?

yufi16 avatar Jun 09 '25 18:06 yufi16

@debasishbsws Is it just for tracking or are you proposing any solution here (instead of fixing it in the Azure project)?

SD-13 avatar Jun 19 '25 19:06 SD-13