Skip to content
Open
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
7 changes: 7 additions & 0 deletions .chronus/changes/python-drop-py39-2026-04-27-06-52-15.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: deprecation
packages:
- "@azure-tools/typespec-python"
---

Drop support for Python 3.9. The minimum supported Python version is now 3.10.
2 changes: 1 addition & 1 deletion packages/typespec-python/eng/scripts/ci/config/mypy.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# global configurations
[mypy]
python_version = 3.9
python_version = 3.10
# Exclude mypy check for sub client tests
exclude = (.*azure/clientgenerator/core/clientinitialization/operations/_operations\.py|.*azure/clientgenerator/core/clientinitialization/aio/operations/_operations\.py)

Expand Down
2 changes: 1 addition & 1 deletion packages/typespec-python/eng/scripts/ci/config/pylintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[MASTER]
py-version=3.9
py-version=3.10
ignore-patterns=test_*,conftest,setup
reports=no

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"reportTypeCommentUsage": true,
"reportMissingImports": false,
"reportAttributeAccessIssue": false,
"pythonVersion": "3.9",
"pythonVersion": "3.10",
"exclude": ["**/build/**"]
}
2 changes: 1 addition & 1 deletion packages/typespec-python/eng/scripts/ci/run_pylint.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _single_dir_pylint(mod):
"--output-format=parseable",
"--recursive=y",
"--ignore=build",
"--py-version=3.9",
"--py-version=3.10",
str(inner_class.absolute()),
]
)
Expand Down
6 changes: 3 additions & 3 deletions packages/typespec-python/eng/scripts/setup/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# --------------------------------------------------------------------------
import sys

if not sys.version_info >= (3, 9, 0):
raise Exception("Autorest for Python extension requires Python 3.9 at least")
if not sys.version_info >= (3, 10, 0):
raise Exception("Autorest for Python extension requires Python 3.10 at least")

try:
from package_manager import detect_package_manager, PackageManagerNotFoundError
Expand All @@ -25,4 +25,4 @@
raise Exception("Your Python installation doesn't have venv available")


# Now we have a package manager (uv or pip) and Py >= 3.9 and check is over
# Now we have a package manager (uv or pip) and Py >= 3.10 and check is over
4 changes: 2 additions & 2 deletions packages/typespec-python/eng/scripts/setup/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# --------------------------------------------------------------------------
import sys

if not sys.version_info >= (3, 9, 0):
raise Exception("Autorest for Python extension requires Python 3.9 at least")
if not sys.version_info >= (3, 10, 0):
raise Exception("Autorest for Python extension requires Python 3.10 at least")

from pathlib import Path
from package_manager import create_venv_with_package_manager, install_packages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { patchPythonPath } from "./system-requirements.js";

async function runPython3(...args: string[]) {
const command = await patchPythonPath(["python", ...args], {
version: ">=3.9",
version: ">=3.10",
environmentVariable: "AUTOREST_PYTHON_EXE",
});
const [cmd, ...cmdArgs] = command;
Expand Down
Loading