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
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: internal
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Drop Python 3.9 from CI pipelines and pin the minimum Python version to 3.10
22 changes: 6 additions & 16 deletions eng/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/generated-code-checks-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions eng/pipelines/publish-dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pr: none

variables:
NodeVersion: "20.x"
PythonVersion: "3.9"
PythonVersion: "3.10"
TestFolder: "$(Build.SourcesDirectory)/test/"

pool:
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions eng/scripts/run_pylint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
]
)
Expand All @@ -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")
Loading