Skip to content

Commit 77ef1c5

Browse files
authored
[Packaging] Support Python 3.13 (#31895)
1 parent 3c8e330 commit 77ef1c5

File tree

12 files changed

+53
-48
lines changed

12 files changed

+53
-48
lines changed

.azure-pipelines/breaking-change-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
fetchDepth: 0
2222
fetchTags: true
2323
- task: UsePythonVersion@0
24-
displayName: 'Use Python 3.12'
24+
displayName: 'Use Python 3.13'
2525
inputs:
26-
versionSpec: 3.12
26+
versionSpec: 3.13
2727
- template: ${{ variables.Pipeline.Workspace }}/.azure-pipelines/templates/azdev_setup.yml
2828
- bash: |
2929
set -ev

azure-pipelines-full-tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ variables:
1616
- template: ${{ variables.Pipeline.Workspace }}/.azure-pipelines/templates/variables.yml
1717

1818
jobs:
19-
- job: AutomationFullTestPython39ProfileLatest
20-
displayName: Automation Full Test Python39 Profile Latest
19+
- job: AutomationFullTestPython312ProfileLatest
20+
displayName: Automation Full Test Python312 Profile Latest
2121
timeoutInMinutes: 9999
2222
strategy:
2323
maxParallel: 8
@@ -43,15 +43,15 @@ jobs:
4343
steps:
4444
- template: .azure-pipelines/templates/automation_test.yml
4545
parameters:
46-
pythonVersion: '3.9'
46+
pythonVersion: '3.12'
4747
profile: 'latest'
4848
instance_cnt: '8'
4949
instance_idx: '$(Instance_idx)'
5050
fullTest: true
5151
jobName: 'FullTest'
5252

53-
- job: AutomationFullTestPython312ProfileLatest
54-
displayName: Automation Full Test Python312 Profile Latest
53+
- job: AutomationFullTestPython313ProfileLatest
54+
displayName: Automation Full Test Python313 Profile Latest
5555
timeoutInMinutes: 9999
5656
strategy:
5757
maxParallel: 8
@@ -77,7 +77,7 @@ jobs:
7777
steps:
7878
- template: .azure-pipelines/templates/automation_test.yml
7979
parameters:
80-
pythonVersion: '3.12'
80+
pythonVersion: '3.13'
8181
profile: 'latest'
8282
instance_cnt: '8'
8383
instance_idx: '$(Instance_idx)'

azure-pipelines.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ jobs:
131131

132132
steps:
133133
- task: UsePythonVersion@0
134-
displayName: 'Use Python 3.12'
134+
displayName: 'Use Python 3.13'
135135
inputs:
136-
versionSpec: 3.12
136+
versionSpec: 3.13
137137

138138
- bash: ./scripts/ci/dependency_check.sh
139139
displayName: 'Verify src/azure-cli/requirements.py3.Linux.txt'
@@ -146,9 +146,9 @@ jobs:
146146

147147
steps:
148148
- task: UsePythonVersion@0
149-
displayName: 'Use Python 3.12'
149+
displayName: 'Use Python 3.13'
150150
inputs:
151-
versionSpec: 3.12
151+
versionSpec: 3.13
152152

153153
- bash: ./scripts/ci/dependency_check.sh
154154
displayName: 'Verify src/azure-cli/requirements.py3.Darwin.txt'
@@ -161,9 +161,9 @@ jobs:
161161

162162
steps:
163163
- task: UsePythonVersion@0
164-
displayName: 'Use Python 3.12'
164+
displayName: 'Use Python 3.13'
165165
inputs:
166-
versionSpec: 3.12
166+
versionSpec: 3.13
167167

168168
- task: BatchScript@1
169169
inputs:
@@ -178,9 +178,9 @@ jobs:
178178
name: ${{ variables.ubuntu_pool }}
179179
steps:
180180
- task: UsePythonVersion@0
181-
displayName: 'Use Python 3.12'
181+
displayName: 'Use Python 3.13'
182182
inputs:
183-
versionSpec: 3.12
183+
versionSpec: 3.13
184184
- template: .azure-pipelines/templates/azdev_setup.yml
185185
- bash: |
186186
set -ev
@@ -433,9 +433,9 @@ jobs:
433433
name: ${{ variables.ubuntu_pool }}
434434
steps:
435435
- task: UsePythonVersion@0
436-
displayName: 'Use Python 3.12'
436+
displayName: 'Use Python 3.13'
437437
inputs:
438-
versionSpec: 3.12
438+
versionSpec: 3.13
439439

440440
- task: PipAuthenticate@1
441441
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/release')
@@ -468,10 +468,10 @@ jobs:
468468
displayName: Test Python Wheels
469469
strategy:
470470
matrix:
471-
Python39:
472-
python.version: '3.9'
473471
Python312:
474472
python.version: '3.12'
473+
Python313:
474+
python.version: '3.13'
475475
dependsOn: BuildPythonWheel
476476
condition: succeeded()
477477
pool:
@@ -508,10 +508,10 @@ jobs:
508508
name: ${{ variables.ubuntu_pool }}
509509
strategy:
510510
matrix:
511-
Python39:
512-
python.version: '3.9'
513511
Python312:
514512
python.version: '3.12'
513+
Python313:
514+
python.version: '3.13'
515515
steps:
516516
- template: .azure-pipelines/templates/automation_test.yml
517517
parameters:
@@ -525,10 +525,10 @@ jobs:
525525
name: ${{ variables.ubuntu_pool }}
526526
strategy:
527527
matrix:
528-
Python39:
529-
python.version: '3.9'
530528
Python312:
531529
python.version: '3.12'
530+
Python313:
531+
python.version: '3.13'
532532
steps:
533533
- template: .azure-pipelines/templates/automation_test.yml
534534
parameters:
@@ -545,10 +545,10 @@ jobs:
545545
name: ${{ variables.ubuntu_pool }}
546546
strategy:
547547
matrix:
548-
Python39:
549-
python.version: '3.9'
550548
Python312:
551549
python.version: '3.12'
550+
Python313:
551+
python.version: '3.13'
552552
steps:
553553
- task: UsePythonVersion@0
554554
displayName: 'Use Python $(python.version)'
@@ -568,8 +568,8 @@ jobs:
568568
name: ${{ variables.ubuntu_pool }}
569569
strategy:
570570
matrix:
571-
Python312:
572-
python.version: '3.12'
571+
Python313:
572+
python.version: '3.13'
573573
steps:
574574
- task: UsePythonVersion@0
575575
displayName: 'Use Python $(python.version)'
@@ -1039,9 +1039,9 @@ jobs:
10391039
name: ${{ variables.ubuntu_multi_core_pool }}
10401040
steps:
10411041
- task: UsePythonVersion@0
1042-
displayName: 'Use Python 3.12'
1042+
displayName: 'Use Python 3.13'
10431043
inputs:
1044-
versionSpec: 3.12
1044+
versionSpec: 3.13
10451045
- template: .azure-pipelines/templates/azdev_setup.yml
10461046
- bash: |
10471047
set -ev
@@ -1055,9 +1055,9 @@ jobs:
10551055
name: ${{ variables.ubuntu_pool }}
10561056
steps:
10571057
- task: UsePythonVersion@0
1058-
displayName: 'Use Python 3.12'
1058+
displayName: 'Use Python 3.13'
10591059
inputs:
1060-
versionSpec: 3.12
1060+
versionSpec: 3.13
10611061
- template: .azure-pipelines/templates/azdev_setup.yml
10621062
- bash: |
10631063
set -ev
@@ -1070,10 +1070,10 @@ jobs:
10701070
displayName: "PerformanceCheck"
10711071
strategy:
10721072
matrix:
1073-
Python39:
1074-
python.version: '3.9'
10751073
Python312:
10761074
python.version: '3.12'
1075+
Python313:
1076+
python.version: '3.13'
10771077
pool:
10781078
name: ${{ variables.ubuntu_pool }}
10791079
steps:
@@ -1101,9 +1101,9 @@ jobs:
11011101
name: ${{ variables.ubuntu_multi_core_pool }}
11021102
steps:
11031103
- task: UsePythonVersion@0
1104-
displayName: 'Use Python 3.12'
1104+
displayName: 'Use Python 3.13'
11051105
inputs:
1106-
versionSpec: 3.12
1106+
versionSpec: 3.13
11071107
- template: .azure-pipelines/templates/azdev_setup.yml
11081108
- bash: |
11091109
set -ev
@@ -1124,9 +1124,9 @@ jobs:
11241124
name: ${{ variables.ubuntu_pool }}
11251125
steps:
11261126
- task: UsePythonVersion@0
1127-
displayName: 'Use Python 3.12'
1127+
displayName: 'Use Python 3.13'
11281128
inputs:
1129-
versionSpec: 3.12
1129+
versionSpec: 3.13
11301130
- template: .azure-pipelines/templates/azdev_setup.yml
11311131
- bash: |
11321132
set -ev

doc/command_guidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ Follow the [Error Handling Guidelines](https://github.com/Azure/azure-cli/blob/d
426426

427427
## Coding Practices
428428

429-
- All code must support Python 3.9 ~ 3.12
429+
- All code must support Python 3.9 ~ 3.13
430430
- PRs to Azure/azure-cli and Azure/azure-cli-extensions must pass CI
431431
- Code must pass style checks with pylint and pep8
432432
- (*) All commands should have tests

doc/extensions/authoring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ See [Extension Metadata](metadata.md) for more information.
130130

131131
### Test your extension on Python 3
132132

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

doc/install_linux_prerequisites.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Some native Linux packages are required when installing the CLI with:
66
- Interactive installation script
77
- `pip`
88

9-
Current supported Python versions are Python 3.9 ~ 3.12.
9+
Current supported Python versions are Python 3.9 ~ 3.13.
1010

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

13-
### Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, Ubuntu 24.04 LTS, Debian 11, Debian 12
13+
### Ubuntu 22.04 LTS, Ubuntu 24.04 LTS, Debian 11, Debian 12
1414
```
1515
sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev build-essential
1616
```

scripts/ci/test_extensions.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ exit_code=0
2525
# Disable alias temporarily: https://github.com/Azure/azure-cli/pull/27717
2626
# hybridaks is going to be deprecated: https://github.com/Azure/azure-cli/pull/29838
2727
# db-up is going to be deprecated: https://github.com/Azure/azure-cli/pull/29887
28-
ignore_list='azure-cli-ml fzf arcappliance arcdata connectedk8s k8s-extension alias hybridaks db-up'
28+
# serviceconnector-passwordless's dependency is not compatible with 3.13 https://github.com/Azure/azure-cli/pull/31895
29+
ignore_list='azure-cli-ml fzf arcappliance arcdata connectedk8s k8s-extension alias hybridaks db-up serviceconnector-passwordless'
2930

3031
# Does not exit if az extension add fails until all extensions have been tested
3132
set +e
@@ -61,7 +62,7 @@ az self-test --debug
6162
if [ $? != 0 ]
6263
then
6364
exit_code=1
64-
echo "Failed to verify:" $ext
65+
echo "Failed to verify"
6566
fi
6667

6768
exit $exit_code

scripts/regression_test/regression_test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
steps:
2121
- task: UsePythonVersion@0
2222
inputs:
23-
versionSpec: '3.12'
24-
displayName: "Use Python 3.12"
23+
versionSpec: '3.13'
24+
displayName: "Use Python 3.13"
2525
- task: AzureCLI@2
2626
displayName: 'update version'
2727
inputs:
@@ -89,8 +89,8 @@ jobs:
8989
steps:
9090
- task: UsePythonVersion@0
9191
inputs:
92-
versionSpec: '3.12'
93-
displayName: "Use Python 3.12"
92+
versionSpec: '3.13'
93+
displayName: "Use Python 3.13"
9494
- task: AzureCLI@2
9595
displayName: 'Checkout Target Branch'
9696
inputs:

src/azure-cli-core/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
'Programming Language :: Python :: 3.10',
4040
'Programming Language :: Python :: 3.11',
4141
'Programming Language :: Python :: 3.12',
42+
'Programming Language :: Python :: 3.13',
4243
'License :: OSI Approved :: MIT License',
4344
]
4445

src/azure-cli-telemetry/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
'Programming Language :: Python :: 3.10',
2121
'Programming Language :: Python :: 3.11',
2222
'Programming Language :: Python :: 3.12',
23+
'Programming Language :: Python :: 3.13',
2324
'License :: OSI Approved :: MIT License',
2425
]
2526

0 commit comments

Comments
 (0)