From 9d5f390a713a5f71bda0a5493aa10e90c79c8543 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Apr 2026 05:28:31 +0000 Subject: [PATCH 1/4] Initial plan From 275800d4281d897998fd96fb36ea487841699329 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 28 Apr 2026 05:31:20 +0000 Subject: [PATCH 2/4] Drop Python 3.9 from eng pipelines, pin min to 3.10 Agent-Logs-Url: https://github.com/Azure/autorest.python/sessions/0ab71a00-5b44-4802-8b24-3d6b6cbd302d Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> --- ...rop-python-39-pipeline-2026-4-28-5-30-0.md | 8 +++++++ eng/pipelines/ci.yml | 22 +++++-------------- .../generated-code-checks-template.yml | 2 +- eng/pipelines/preview.yml | 4 ++-- eng/pipelines/publish-dev-release.yml | 6 ++--- eng/scripts/run_pylint.py | 6 ++--- 6 files changed, 23 insertions(+), 25 deletions(-) create mode 100644 .chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md diff --git a/.chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md b/.chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md new file mode 100644 index 00000000000..770997cd4a3 --- /dev/null +++ b/.chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md @@ -0,0 +1,8 @@ +--- +changeKind: internal +packages: + - "@autorest/python" + - "@azure-tools/typespec-python" +--- + +Drop Python 3.9 from CI pipelines and pin the minimum tested Python version to 3.10. diff --git a/eng/pipelines/ci.yml b/eng/pipelines/ci.yml index 558c78a4743..6bbb6e4f6ef 100644 --- a/eng/pipelines/ci.yml +++ b/eng/pipelines/ci.yml @@ -49,20 +49,15 @@ jobs: strategy: matrix: - Linux_Python3.9: + Linux_Python3.10: OSName: "Linux" Pool: ${{ variables.LINUXPOOL }} OSVmImage: ${{ variables.LINUXVMIMAGE}} - PythonVersion: "3.9" - Windows_Python3.9: + PythonVersion: "3.10" + Windows_Python3.10: OSName: "Windows" Pool: ${{ variables.WINDOWSPOOL }} OSVmImage: ${{ variables.WINDOWSVMIMAGE}} - PythonVersion: "3.9" - Linux_Python3.10: - OSName: "Linux" - Pool: ${{ variables.LINUXPOOL }} - OSVmImage: ${{ variables.LINUXVMIMAGE}} PythonVersion: "3.10" Linux_Python3.11: OSName: "Linux" @@ -140,20 +135,15 @@ jobs: strategy: matrix: - Linux_Python3.9: + Linux_Python310: OSName: "Linux" Pool: ${{ variables.LINUXPOOL }} OSVmImage: ${{ variables.LINUXVMIMAGE}} - PythonVersion: "3.9" - Windows_Python3.9: + PythonVersion: "3.10" + Windows_Python310: OSName: "Windows" Pool: ${{ variables.WINDOWSPOOL }} OSVmImage: ${{ variables.WINDOWSVMIMAGE}} - PythonVersion: "3.9" - Linux_Python310: - OSName: "Linux" - Pool: ${{ variables.LINUXPOOL }} - OSVmImage: ${{ variables.LINUXVMIMAGE}} PythonVersion: "3.10" Linux_Python311: OSName: "Linux" diff --git a/eng/pipelines/generated-code-checks-template.yml b/eng/pipelines/generated-code-checks-template.yml index 3f0c63e5ddf..5128bf1a226 100644 --- a/eng/pipelines/generated-code-checks-template.yml +++ b/eng/pipelines/generated-code-checks-template.yml @@ -10,7 +10,7 @@ steps: - script: npm run test -- --env=lint --flavor=${{ parameters.folderName }} displayName: Lint ${{ parameters.folderName }} - Python $(PythonVersion) workingDirectory: $(Build.SourcesDirectory)/autorest.python/packages/${{parameters.package}} - condition: and(eq(variables['PythonVersion'], '3.9'), or(contains('${{ parameters.folderName }}', 'version-tolerant'), eq('${{parameters.package}}', 'typespec-python'))) + condition: and(eq(variables['PythonVersion'], '3.10'), or(contains('${{ parameters.folderName }}', 'version-tolerant'), eq('${{parameters.package}}', 'typespec-python'))) - script: npm run test -- --env=mypy --flavor=${{ parameters.folderName }} displayName: Mypy ${{ parameters.folderName }} - Python $(PythonVersion) diff --git a/eng/pipelines/preview.yml b/eng/pipelines/preview.yml index 4040a149350..a409fefb3ef 100644 --- a/eng/pipelines/preview.yml +++ b/eng/pipelines/preview.yml @@ -76,9 +76,9 @@ extends: versionSpec: 3.11 SdkInitializationSteps: - task: UsePythonVersion@0 - displayName: "Use Python 3.9" + displayName: "Use Python 3.10" inputs: - versionSpec: 3.9 + versionSpec: 3.10 - script: | echo "npm install -g @azure-tools/typespec-client-generator-cli" npm install -g @azure-tools/typespec-client-generator-cli diff --git a/eng/pipelines/publish-dev-release.yml b/eng/pipelines/publish-dev-release.yml index 6285827ee67..3dc9241c93d 100644 --- a/eng/pipelines/publish-dev-release.yml +++ b/eng/pipelines/publish-dev-release.yml @@ -3,7 +3,7 @@ pr: none variables: NodeVersion: "20.x" - PythonVersion: "3.9" + PythonVersion: "3.10" TestFolder: "$(Build.SourcesDirectory)/test/" pool: @@ -16,9 +16,9 @@ steps: versionSpec: "$(NodeVersion)" - task: UsePythonVersion@0 - displayName: "Use Python 3.9" + displayName: "Use Python 3.10" inputs: - versionSpec: 3.9 + versionSpec: 3.10 - script: | cd $(Build.SourcesDirectory) diff --git a/eng/scripts/run_pylint.py b/eng/scripts/run_pylint.py index 7224cc3ceae..81d0fcb52e6 100644 --- a/eng/scripts/run_pylint.py +++ b/eng/scripts/run_pylint.py @@ -38,7 +38,7 @@ def _single_dir_pylint(mod): "--load-plugins=pylint_guidelines_checker", "--output-format=parseable", "--recursive=y", - "--py-version=3.9", + "--py-version=3.10", str(inner_class.absolute()), ] ) @@ -49,7 +49,7 @@ def _single_dir_pylint(mod): if __name__ == "__main__": - if sys.version_info >= (3, 10, 0): - # only run pylint with python 3.9 + if sys.version_info >= (3, 11, 0) or sys.version_info < (3, 10, 0): + # only run pylint with python 3.10 sys.exit(0) run_check("pylint", _single_dir_pylint, "Pylint") From 7c38fe0876b48f33b6fcaf39e371d8942cda9c9e Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 28 Apr 2026 14:38:15 +0800 Subject: [PATCH 3/4] Update drop-python-39-pipeline-2026-4-28-5-30-0.md --- .chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md b/.chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md index 770997cd4a3..b59d0b3c00a 100644 --- a/.chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md +++ b/.chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md @@ -5,4 +5,4 @@ packages: - "@azure-tools/typespec-python" --- -Drop Python 3.9 from CI pipelines and pin the minimum tested Python version to 3.10. +Drop Python 3.9 from CI pipelines and pin the minimum tested Python version to 3.10 From f0b8c1816a7b6c0dfb92879f2a6e7be2ff46a990 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Tue, 28 Apr 2026 14:47:40 +0800 Subject: [PATCH 4/4] Update drop-python-39-pipeline-2026-4-28-5-30-0.md --- .chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md b/.chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md index b59d0b3c00a..1b9cd8dfbdb 100644 --- a/.chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md +++ b/.chronus/changes/drop-python-39-pipeline-2026-4-28-5-30-0.md @@ -5,4 +5,4 @@ packages: - "@azure-tools/typespec-python" --- -Drop Python 3.9 from CI pipelines and pin the minimum tested Python version to 3.10 +Drop Python 3.9 from CI pipelines and pin the minimum Python version to 3.10