diff --git a/.chronus/changes/python-3-15-support-2026-10-12.md b/.chronus/changes/python-3-15-support-2026-10-12.md new file mode 100644 index 00000000000..8929234664c --- /dev/null +++ b/.chronus/changes/python-3-15-support-2026-10-12.md @@ -0,0 +1,7 @@ +--- +changeKind: feature +packages: + - "@typespec/http-client-python" +--- + +Add Python 3.15 to generated package classifiers. diff --git a/.github/workflows/ci-emitter-diff-python.yml b/.github/workflows/ci-emitter-diff-python.yml index edfe1873245..b5bece30afe 100644 --- a/.github/workflows/ci-emitter-diff-python.yml +++ b/.github/workflows/ci-emitter-diff-python.yml @@ -42,7 +42,7 @@ jobs: - uses: ./.github/actions/setup - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - python-version: "3.12" + python-version: "3.15" - name: Install repo dependencies run: pnpm install diff --git a/.github/workflows/ci-python.yml b/.github/workflows/ci-python.yml index 11147b0e120..250bad55f0e 100644 --- a/.github/workflows/ci-python.yml +++ b/.github/workflows/ci-python.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - python-version: "3.12" + python-version: "3.15" - name: Install repo dependencies run: pnpm install @@ -71,7 +71,7 @@ jobs: - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - python-version: "3.12" + python-version: "3.15" - name: Download generated artifacts uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 @@ -105,7 +105,7 @@ jobs: - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - python-version: "3.12" + python-version: "3.15" - name: Download generated artifacts uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 @@ -139,7 +139,7 @@ jobs: - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - python-version: "3.12" + python-version: "3.15" - name: Download generated artifacts uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 @@ -184,7 +184,7 @@ jobs: - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - python-version: "3.12" + python-version: "3.15" - name: Download generated artifacts uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 @@ -220,7 +220,7 @@ jobs: - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: - python-version: "3.12" + python-version: "3.15" - name: Install repo dependencies run: pnpm install diff --git a/packages/http-client-python/eng/pipeline/publish.yml b/packages/http-client-python/eng/pipeline/publish.yml index d134468d578..09b3aee24f1 100644 --- a/packages/http-client-python/eng/pipeline/publish.yml +++ b/packages/http-client-python/eng/pipeline/publish.yml @@ -30,5 +30,5 @@ extends: LanguageShortName: "python" CadlRanchName: "@typespec/http-client-python" EnableCadlRanchReport: false - PythonVersion: "3.11" + PythonVersion: "3.15" UploadPlaygroundBundle: true diff --git a/packages/http-client-python/eng/pipeline/templates/ci-stages.yml b/packages/http-client-python/eng/pipeline/templates/ci-stages.yml index 63ffca6588c..08fc6b86fb8 100644 --- a/packages/http-client-python/eng/pipeline/templates/ci-stages.yml +++ b/packages/http-client-python/eng/pipeline/templates/ci-stages.yml @@ -26,4 +26,4 @@ stages: Condition: ${{ parameters.Condition }} DependsOn: ${{ parameters.DependsOn }} LanguageShortName: "python" - PythonVersion: "3.12" + PythonVersion: "3.15" diff --git a/packages/http-client-python/generator/pygen/codegen/serializers/general_serializer.py b/packages/http-client-python/generator/pygen/codegen/serializers/general_serializer.py index 4700b527667..b35cffc746d 100644 --- a/packages/http-client-python/generator/pygen/codegen/serializers/general_serializer.py +++ b/packages/http-client-python/generator/pygen/codegen/serializers/general_serializer.py @@ -29,7 +29,7 @@ } MIN_PYTHON_VERSION = "3.10" -MAX_PYTHON_VERSION = "3.14" +MAX_PYTHON_VERSION = "3.15" class GeneralSerializer(BaseSerializer): diff --git a/packages/http-client-python/generator/setup.py b/packages/http-client-python/generator/setup.py index dad42c6ccab..73da843c888 100644 --- a/packages/http-client-python/generator/setup.py +++ b/packages/http-client-python/generator/setup.py @@ -39,6 +39,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", "License :: OSI Approved :: MIT License", ], packages=find_packages( diff --git a/packages/http-client-python/tests/generated/azure/authentication-union/pyproject.toml b/packages/http-client-python/tests/generated/azure/authentication-union/pyproject.toml index c31cd4a1a76..e9ad6434d75 100644 --- a/packages/http-client-python/tests/generated/azure/authentication-union/pyproject.toml +++ b/packages/http-client-python/tests/generated/azure/authentication-union/pyproject.toml @@ -26,6 +26,7 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", ] requires-python = ">=3.10" keywords = ["azure", "azure sdk"] diff --git a/packages/http-client-python/tests/unit/test_pyproject_keep_fields.py b/packages/http-client-python/tests/unit/test_pyproject_keep_fields.py index b58c4ef6000..71cdef8df31 100644 --- a/packages/http-client-python/tests/unit/test_pyproject_keep_fields.py +++ b/packages/http-client-python/tests/unit/test_pyproject_keep_fields.py @@ -9,7 +9,7 @@ the emitter doesn't own (description, classifiers, project URLs) must be preserved so they are not clobbered (see GitHub issue #10311). """ -from pygen.codegen.serializers.general_serializer import GeneralSerializer +from pygen.codegen.serializers.general_serializer import MAX_PYTHON_VERSION, GeneralSerializer _ALL_FIELDS = ("authors", "description", "classifiers", "urls") @@ -192,7 +192,7 @@ def _render_pyproject(option_value, existing_content): client_name="X", VERSION_MAP={"isodate": "0.6.1", "azure-core": "1.37.0", "typing-extensions": "4.6.0"}, MIN_PYTHON_VERSION="3.10", - MAX_PYTHON_VERSION="3.14", + MAX_PYTHON_VERSION=MAX_PYTHON_VERSION, ADDITIONAL_DEPENDENCIES=[], ) return tomli.loads(rendered) @@ -228,6 +228,7 @@ def test_render_keeps_nothing_by_default(): assert parsed["authors"] == [{"name": "Microsoft Corporation", "email": "azpysdkhelp@microsoft.com"}] assert parsed["description"] != "Microsoft Azure AI Sample Client Library for Python" assert "Programming Language :: Python :: 3.99" not in parsed["classifiers"] + assert "Programming Language :: Python :: 3.15" in parsed["classifiers"] assert parsed["urls"]["repository"] == "https://github.com/Azure/azure-sdk-for-python"