Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .azure-pipelines/breaking-change-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
fetchTags: true
persistCredentials: true
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
displayName: 'Use Python 3.13'
inputs:
versionSpec: 3.12
versionSpec: 3.13
- template: ${{ variables.Pipeline.Workspace }}/.azure-pipelines/templates/azdev_setup.yml
- bash: |
set -ev
Expand Down
46 changes: 6 additions & 40 deletions azure-pipelines-full-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ jobs:
fullTest: true
jobName: 'FullTest'

- job: AutomationFullTestPython39ProfileLatest
displayName: Automation Full Test Python39 Profile Latest
- job: AutomationFullTestPython312ProfileLatest
displayName: Automation Full Test Python312 Profile Latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We keep the test for Python 3.12 because RHEL only has Python 3.12, right? (#32381 (comment))

Copy link
Contributor Author

@bebound bebound Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. 3.12 is the latest version on RHEL.

timeoutInMinutes: 9999
strategy:
maxParallel: 8
Expand All @@ -100,15 +100,15 @@ jobs:
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
pythonVersion: '3.9'
pythonVersion: '3.12'
profile: 'latest'
instance_cnt: '8'
instance_idx: '$(Instance_idx)'
fullTest: true
jobName: 'FullTest'

- job: AutomationFullTestPython312ProfileLatest
displayName: Automation Full Test Python312 Profile Latest
- job: AutomationFullTestPython313ProfileLatest
displayName: Automation Full Test Python313 Profile Latest
timeoutInMinutes: 9999
strategy:
maxParallel: 8
Expand All @@ -134,43 +134,9 @@ jobs:
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
pythonVersion: '3.12'
pythonVersion: '3.13'
profile: 'latest'
instance_cnt: '8'
instance_idx: '$(Instance_idx)'
fullTest: true
jobName: 'FullTest'

- job: NotifyCIErrors
dependsOn:
- AutomationTest20200901
- AutomationTest20190301
- AutomationTest20180301
- AutomationFullTestPython39ProfileLatest
condition: and(failed(), in(variables['Build.Reason'], 'BatchedCI'))
displayName: Notify CI Errors
pool:
name: ${{ variables.ubuntu_pool }}
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
inputs:
versionSpec: 3.12
- task: AzureCLI@2
inputs:
azureSubscription: 'Azure CLI'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
pip install requests
teams_api_url=$(az keyvault secret show --vault-name $(TEAMS_BOT_VAULT_NAME) --name $(TEAMS_BOT_API_URL_SECRET_NAME) --query value -otsv)
teams_api_key=$(az keyvault secret show --vault-name $(TEAMS_BOT_VAULT_NAME) --name $(TEAMS_BOT_API_KEY_SECRET_NAME) --query value -otsv)
echo "If any task fails, notify to teams channel"
python scripts/ci/notify_ci_errors.py $teams_api_url $teams_api_key $(TEAMS_CHANNEL_ID)
displayName: 'Notify To Teams Channel'
env:
BASE_URI: $(System.CollectionUri)
PROJECT_TYPE: $(System.TeamProject)
BUILD_ID: $(Build.BuildId)
JOB_ID: $(System.JobId)
enabled: false
60 changes: 30 additions & 30 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ jobs:

steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
displayName: 'Use Python 3.13'
inputs:
versionSpec: 3.12
versionSpec: 3.13

- bash: ./scripts/ci/dependency_check.sh
displayName: 'Verify src/azure-cli/requirements.py3.Linux.txt'
Expand All @@ -144,9 +144,9 @@ jobs:

steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
displayName: 'Use Python 3.13'
inputs:
versionSpec: 3.12
versionSpec: 3.13

- bash: ./scripts/ci/dependency_check.sh
displayName: 'Verify src/azure-cli/requirements.py3.Darwin.txt'
Expand All @@ -159,9 +159,9 @@ jobs:

steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
displayName: 'Use Python 3.13'
inputs:
versionSpec: 3.12
versionSpec: 3.13

- task: BatchScript@1
inputs:
Expand All @@ -176,9 +176,9 @@ jobs:
name: ${{ variables.ubuntu_pool }}
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
displayName: 'Use Python 3.13'
inputs:
versionSpec: 3.12
versionSpec: 3.13
- template: .azure-pipelines/templates/azdev_setup.yml
- bash: |
set -ev
Expand Down Expand Up @@ -440,9 +440,9 @@ jobs:
name: ${{ variables.ubuntu_pool }}
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
displayName: 'Use Python 3.13'
inputs:
versionSpec: 3.12
versionSpec: 3.13

- task: PipAuthenticate@1
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/release')
Expand Down Expand Up @@ -475,10 +475,10 @@ jobs:
displayName: Test Python Wheels
strategy:
matrix:
Python39:
python.version: '3.9'
Python312:
python.version: '3.12'
Python313:
python.version: '3.13'
dependsOn: BuildPythonWheel
condition: succeeded()
pool:
Expand Down Expand Up @@ -515,10 +515,10 @@ jobs:
name: ${{ variables.ubuntu_pool }}
strategy:
matrix:
Python39:
python.version: '3.9'
Python312:
python.version: '3.12'
Python313:
python.version: '3.13'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand All @@ -532,10 +532,10 @@ jobs:
name: ${{ variables.ubuntu_pool }}
strategy:
matrix:
Python39:
python.version: '3.9'
Python312:
python.version: '3.12'
Python313:
python.version: '3.13'
steps:
- template: .azure-pipelines/templates/automation_test.yml
parameters:
Expand All @@ -552,10 +552,10 @@ jobs:
name: ${{ variables.ubuntu_pool }}
strategy:
matrix:
Python39:
python.version: '3.9'
Python312:
python.version: '3.12'
Python313:
python.version: '3.13'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
Expand All @@ -575,8 +575,8 @@ jobs:
name: ${{ variables.ubuntu_pool }}
strategy:
matrix:
Python312:
python.version: '3.12'
Python313:
python.version: '3.13'
steps:
- task: UsePythonVersion@0
displayName: 'Use Python $(python.version)'
Expand Down Expand Up @@ -1040,9 +1040,9 @@ jobs:
name: ${{ variables.ubuntu_pool }}
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
displayName: 'Use Python 3.13'
inputs:
versionSpec: 3.12
versionSpec: 3.13
- template: .azure-pipelines/templates/azdev_setup.yml
- bash: |
set -ev
Expand All @@ -1057,9 +1057,9 @@ jobs:
name: ${{ variables.ubuntu_pool }}
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
displayName: 'Use Python 3.13'
inputs:
versionSpec: 3.12
versionSpec: 3.13
- template: .azure-pipelines/templates/azdev_setup.yml
- bash: |
set -ev
Expand All @@ -1072,10 +1072,10 @@ jobs:
displayName: "PerformanceCheck"
strategy:
matrix:
Python39:
python.version: '3.9'
Python312:
python.version: '3.12'
Python313:
python.version: '3.13'
pool:
name: ${{ variables.ubuntu_pool }}
steps:
Expand Down Expand Up @@ -1103,9 +1103,9 @@ jobs:
name: ${{ variables.ubuntu_pool }}
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
displayName: 'Use Python 3.13'
inputs:
versionSpec: 3.12
versionSpec: 3.13
- template: .azure-pipelines/templates/azdev_setup.yml
- bash: |
set -ev
Expand All @@ -1126,9 +1126,9 @@ jobs:
name: ${{ variables.ubuntu_pool }}
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.12'
displayName: 'Use Python 3.13'
inputs:
versionSpec: 3.12
versionSpec: 3.13
- template: .azure-pipelines/templates/azdev_setup.yml
- bash: |
set -ev
Expand Down
2 changes: 1 addition & 1 deletion doc/command_guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ Follow the [Error Handling Guidelines](https://github.com/Azure/azure-cli/blob/d

## Coding Practices

- All code must support Python 3.8 ~ 3.12
- All code must support Python 3.9 ~ 3.13
- PRs to Azure/azure-cli and Azure/azure-cli-extensions must pass CI
- Code must pass style checks with pylint and pep8
- (*) All commands should have tests
2 changes: 1 addition & 1 deletion doc/extensions/authoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ See [Extension Metadata](metadata.md) for more information.

### Test your extension on Python 3

- The Azure CLI supports Python 3.8 ~ 3.12 so verify that your extension does the same.
- The Azure CLI supports Python 3.9 ~ 3.13 so verify that your extension does the same.
- You can create virtual environments for different versions and run your extension in them.
- e.g. `python3.8 -m venv env38` and `python3.10 -m venv env310`.

Expand Down
13 changes: 2 additions & 11 deletions doc/install_linux_prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Some native Linux packages are required when installing the CLI with:
- Interactive installation script
- `pip`

Current supported Python versions are Python 3.8 ~ 3.10.
Current supported Python versions are Python 3.9 ~ 3.13.

The commands to run to install the dependencies for some common distributions are listed below.

### Ubuntu 18.04 LTS, Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, Debian 9, Debian 10, Debian 11
### Ubuntu 22.04 LTS, Ubuntu 24.04 LTS, Debian 11, Debian 12
```
sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev build-essential
```
Expand All @@ -21,12 +21,3 @@ Install the latest Python 3.9 available in the software repo.
sudo dnf install -y gcc libffi-devel python39-devel openssl-devel
```

### SUSE OpenSUSE 13.2
Install Python 3.8+ if needed.
```
sudo zypper refresh && sudo zypper --non-interactive install gcc libffi-devel python-devel openssl-devel
```

### Flatcar

Python is installed in the Azure-specific distribution of Flatcar, but is installed into the non-standard location `/usr/share/oem/python/bin/python`.
5 changes: 3 additions & 2 deletions scripts/ci/test_extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ exit_code=0
# Disable alias temporarily: https://github.com/Azure/azure-cli/pull/27717
# hybridaks is going to be deprecated: https://github.com/Azure/azure-cli/pull/29838
# db-up is going to be deprecated: https://github.com/Azure/azure-cli/pull/29887
ignore_list='azure-cli-ml fzf arcappliance arcdata connectedk8s k8s-extension alias hybridaks db-up'
# serviceconnector-passwordless's dependency is not compatible with 3.13 https://github.com/Azure/azure-cli/pull/31895
ignore_list='azure-cli-ml fzf arcappliance arcdata connectedk8s k8s-extension alias hybridaks db-up serviceconnector-passwordless'

# Does not exit if az extension add fails until all extensions have been tested
set +e
Expand Down Expand Up @@ -53,7 +54,7 @@ az self-test --debug
if [ $? != 0 ]
then
exit_code=1
echo "Failed to verify:" $ext
echo "Failed to verify"
fi

exit $exit_code
12 changes: 6 additions & 6 deletions scripts/regression_test/regression_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12'
displayName: "Use Python 3.12"
- task: AzureCLI@1
versionSpec: '3.13'
displayName: "Use Python 3.13"
- task: AzureCLI@2
displayName: 'update version'
inputs:
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
Expand Down Expand Up @@ -88,9 +88,9 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12'
displayName: "Use Python 3.12"
- task: AzureCLI@1
versionSpec: '3.13'
displayName: "Use Python 3.13"
- task: AzureCLI@2
displayName: 'Checkout Target Branch'
inputs:
azureSubscription: $(AZURE_SDK_INFRA_SUB_CONNECTED_SERVICE)
Expand Down
1 change: 1 addition & 0 deletions src/azure-cli-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'License :: OSI Approved :: MIT License',
]

Expand Down
1 change: 1 addition & 0 deletions src/azure-cli-telemetry/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'License :: OSI Approved :: MIT License',
]

Expand Down
1 change: 1 addition & 0 deletions src/azure-cli-testsdk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'License :: OSI Approved :: MIT License',
]

Expand Down
1 change: 1 addition & 0 deletions src/azure-cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'License :: OSI Approved :: MIT License',
]

Expand Down
Loading