diff --git a/.azure-pipelines/breaking-change-tests.yml b/.azure-pipelines/breaking-change-tests.yml index 62b655c9a58..d30f2668241 100644 --- a/.azure-pipelines/breaking-change-tests.yml +++ b/.azure-pipelines/breaking-change-tests.yml @@ -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 diff --git a/azure-pipelines-full-tests.yml b/azure-pipelines-full-tests.yml index 772c66fc694..bb1e07041ce 100644 --- a/azure-pipelines-full-tests.yml +++ b/azure-pipelines-full-tests.yml @@ -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 timeoutInMinutes: 9999 strategy: maxParallel: 8 @@ -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 @@ -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 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5ea273b6437..53d83fe8e0e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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' @@ -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' @@ -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: @@ -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 @@ -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') @@ -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: @@ -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: @@ -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: @@ -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)' @@ -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)' @@ -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 @@ -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 @@ -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: @@ -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 @@ -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 diff --git a/doc/command_guidelines.md b/doc/command_guidelines.md index ff2b24dfdeb..90f10a2d8b5 100644 --- a/doc/command_guidelines.md +++ b/doc/command_guidelines.md @@ -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 diff --git a/doc/extensions/authoring.md b/doc/extensions/authoring.md index e259d1d6761..0e4d8fd440c 100644 --- a/doc/extensions/authoring.md +++ b/doc/extensions/authoring.md @@ -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`. diff --git a/doc/install_linux_prerequisites.md b/doc/install_linux_prerequisites.md index 4a72da6ca90..fda0bf564dd 100644 --- a/doc/install_linux_prerequisites.md +++ b/doc/install_linux_prerequisites.md @@ -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 ``` @@ -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`. diff --git a/scripts/ci/test_extensions.sh b/scripts/ci/test_extensions.sh index d2f48c74a5b..aa809063029 100755 --- a/scripts/ci/test_extensions.sh +++ b/scripts/ci/test_extensions.sh @@ -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 @@ -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 diff --git a/scripts/regression_test/regression_test.yml b/scripts/regression_test/regression_test.yml index 4881e28b626..bfd6329abb3 100644 --- a/scripts/regression_test/regression_test.yml +++ b/scripts/regression_test/regression_test.yml @@ -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) @@ -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) diff --git a/src/azure-cli-core/setup.py b/src/azure-cli-core/setup.py index da6b832c581..3a759f5cf8e 100644 --- a/src/azure-cli-core/setup.py +++ b/src/azure-cli-core/setup.py @@ -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', ] diff --git a/src/azure-cli-telemetry/setup.py b/src/azure-cli-telemetry/setup.py index d188fa71f95..69e43595488 100755 --- a/src/azure-cli-telemetry/setup.py +++ b/src/azure-cli-telemetry/setup.py @@ -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', ] diff --git a/src/azure-cli-testsdk/setup.py b/src/azure-cli-testsdk/setup.py index 4f567ef6705..ccbee7bc7f8 100644 --- a/src/azure-cli-testsdk/setup.py +++ b/src/azure-cli-testsdk/setup.py @@ -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', ] diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index 485a8cfc68b..6b293a63f0f 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -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', ]