Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Commit 07e6c7f

Browse files
Copilotmsyyc
andauthored
Drop Python 3.9 from CI pipelines, pin minimum to 3.10 (#3461)
* Initial plan * 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> * Update drop-python-39-pipeline-2026-4-28-5-30-0.md --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
1 parent 8d182ad commit 07e6c7f

6 files changed

Lines changed: 23 additions & 25 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
changeKind: internal
3+
packages:
4+
- "@autorest/python"
5+
- "@azure-tools/typespec-python"
6+
---
7+
8+
Drop Python 3.9 from CI pipelines and pin the minimum Python version to 3.10

eng/pipelines/ci.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,15 @@ jobs:
4949

5050
strategy:
5151
matrix:
52-
Linux_Python3.9:
52+
Linux_Python3.10:
5353
OSName: "Linux"
5454
Pool: ${{ variables.LINUXPOOL }}
5555
OSVmImage: ${{ variables.LINUXVMIMAGE}}
56-
PythonVersion: "3.9"
57-
Windows_Python3.9:
56+
PythonVersion: "3.10"
57+
Windows_Python3.10:
5858
OSName: "Windows"
5959
Pool: ${{ variables.WINDOWSPOOL }}
6060
OSVmImage: ${{ variables.WINDOWSVMIMAGE}}
61-
PythonVersion: "3.9"
62-
Linux_Python3.10:
63-
OSName: "Linux"
64-
Pool: ${{ variables.LINUXPOOL }}
65-
OSVmImage: ${{ variables.LINUXVMIMAGE}}
6661
PythonVersion: "3.10"
6762
Linux_Python3.11:
6863
OSName: "Linux"
@@ -140,20 +135,15 @@ jobs:
140135

141136
strategy:
142137
matrix:
143-
Linux_Python3.9:
138+
Linux_Python310:
144139
OSName: "Linux"
145140
Pool: ${{ variables.LINUXPOOL }}
146141
OSVmImage: ${{ variables.LINUXVMIMAGE}}
147-
PythonVersion: "3.9"
148-
Windows_Python3.9:
142+
PythonVersion: "3.10"
143+
Windows_Python310:
149144
OSName: "Windows"
150145
Pool: ${{ variables.WINDOWSPOOL }}
151146
OSVmImage: ${{ variables.WINDOWSVMIMAGE}}
152-
PythonVersion: "3.9"
153-
Linux_Python310:
154-
OSName: "Linux"
155-
Pool: ${{ variables.LINUXPOOL }}
156-
OSVmImage: ${{ variables.LINUXVMIMAGE}}
157147
PythonVersion: "3.10"
158148
Linux_Python311:
159149
OSName: "Linux"

eng/pipelines/generated-code-checks-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ steps:
1010
- script: npm run test -- --env=lint --flavor=${{ parameters.folderName }}
1111
displayName: Lint ${{ parameters.folderName }} - Python $(PythonVersion)
1212
workingDirectory: $(Build.SourcesDirectory)/autorest.python/packages/${{parameters.package}}
13-
condition: and(eq(variables['PythonVersion'], '3.9'), or(contains('${{ parameters.folderName }}', 'version-tolerant'), eq('${{parameters.package}}', 'typespec-python')))
13+
condition: and(eq(variables['PythonVersion'], '3.10'), or(contains('${{ parameters.folderName }}', 'version-tolerant'), eq('${{parameters.package}}', 'typespec-python')))
1414

1515
- script: npm run test -- --env=mypy --flavor=${{ parameters.folderName }}
1616
displayName: Mypy ${{ parameters.folderName }} - Python $(PythonVersion)

eng/pipelines/preview.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ extends:
7676
versionSpec: 3.11
7777
SdkInitializationSteps:
7878
- task: UsePythonVersion@0
79-
displayName: "Use Python 3.9"
79+
displayName: "Use Python 3.10"
8080
inputs:
81-
versionSpec: 3.9
81+
versionSpec: 3.10
8282
- script: |
8383
echo "npm install -g @azure-tools/typespec-client-generator-cli"
8484
npm install -g @azure-tools/typespec-client-generator-cli

eng/pipelines/publish-dev-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pr: none
33

44
variables:
55
NodeVersion: "20.x"
6-
PythonVersion: "3.9"
6+
PythonVersion: "3.10"
77
TestFolder: "$(Build.SourcesDirectory)/test/"
88

99
pool:
@@ -16,9 +16,9 @@ steps:
1616
versionSpec: "$(NodeVersion)"
1717

1818
- task: UsePythonVersion@0
19-
displayName: "Use Python 3.9"
19+
displayName: "Use Python 3.10"
2020
inputs:
21-
versionSpec: 3.9
21+
versionSpec: 3.10
2222

2323
- script: |
2424
cd $(Build.SourcesDirectory)

eng/scripts/run_pylint.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def _single_dir_pylint(mod):
3838
"--load-plugins=pylint_guidelines_checker",
3939
"--output-format=parseable",
4040
"--recursive=y",
41-
"--py-version=3.9",
41+
"--py-version=3.10",
4242
str(inner_class.absolute()),
4343
]
4444
)
@@ -49,7 +49,7 @@ def _single_dir_pylint(mod):
4949

5050

5151
if __name__ == "__main__":
52-
if sys.version_info >= (3, 10, 0):
53-
# only run pylint with python 3.9
52+
if sys.version_info >= (3, 11, 0) or sys.version_info < (3, 10, 0):
53+
# only run pylint with python 3.10
5454
sys.exit(0)
5555
run_check("pylint", _single_dir_pylint, "Pylint")

0 commit comments

Comments
 (0)