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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: fix
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Fix enum member names with hyphens generating invalid Python identifiers
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: internal
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Add apiview and sphinx to ci
9 changes: 9 additions & 0 deletions .chronus/changes/python-drop-39-2026-4-27-6-50-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: deprecation
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Drop support for Python 3.9. The minimum supported Python version is now 3.10. Python 3.9 reached end-of-life and is no longer supported by upstream Python.
8 changes: 8 additions & 0 deletions .chronus/changes/python-fixCI-2026-3-24-14-53-10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: internal
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Fix failing CI
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: internal
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Fix transient mypy CI failures on Windows with retry logic and update CONTRIBUTING docs to reflect the new end-to-end release workflow
8 changes: 8 additions & 0 deletions .chronus/changes/revert-wrong-code-2026-3-29-13-46-47.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: fix
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Revert wrong code to avoid overwrite customized code when generation-subdir is set
40 changes: 20 additions & 20 deletions eng/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ jobs:
Pool: ${{ variables.LINUXPOOL }}
OSVmImage: ${{ variables.LINUXVMIMAGE}}
PythonVersion: "3.10"
Windows_Python3.10:
OSName: "Windows"
Pool: ${{ variables.WINDOWSPOOL }}
OSVmImage: ${{ variables.WINDOWSVMIMAGE}}
PythonVersion: "3.10"
Linux_Python3.11:
OSName: "Linux"
Pool: ${{ variables.LINUXPOOL }}
Expand All @@ -69,11 +64,16 @@ jobs:
Pool: ${{ variables.LINUXPOOL }}
OSVmImage: ${{ variables.LINUXVMIMAGE}}
PythonVersion: "3.13"
Windows_Python3.13:
OSName: "Windows"
Pool: ${{ variables.WINDOWSPOOL }}
OSVmImage: ${{ variables.WINDOWSVMIMAGE}}
PythonVersion: "3.13"
# Windows_Python3.10:
# OSName: "Windows"
# Pool: ${{ variables.WINDOWSPOOL }}
# OSVmImage: ${{ variables.WINDOWSVMIMAGE}}
# PythonVersion: "3.10"
# Windows_Python3.13:
# OSName: "Windows"
# Pool: ${{ variables.WINDOWSPOOL }}
# OSVmImage: ${{ variables.WINDOWSVMIMAGE}}
# PythonVersion: "3.13"

pool:
name: $(Pool)
Expand Down Expand Up @@ -140,11 +140,6 @@ jobs:
Pool: ${{ variables.LINUXPOOL }}
OSVmImage: ${{ variables.LINUXVMIMAGE}}
PythonVersion: "3.10"
Windows_Python310:
OSName: "Windows"
Pool: ${{ variables.WINDOWSPOOL }}
OSVmImage: ${{ variables.WINDOWSVMIMAGE}}
PythonVersion: "3.10"
Linux_Python311:
OSName: "Linux"
Pool: ${{ variables.LINUXPOOL }}
Expand All @@ -155,11 +150,16 @@ jobs:
Pool: ${{ variables.LINUXPOOL }}
OSVmImage: ${{ variables.LINUXVMIMAGE}}
PythonVersion: "3.13"
Windows_Python313:
OSName: "Windows"
Pool: ${{ variables.WINDOWSPOOL }}
OSVmImage: ${{ variables.WINDOWSVMIMAGE}}
PythonVersion: "3.13"
# Windows_Python310:
# OSName: "Windows"
# Pool: ${{ variables.WINDOWSPOOL }}
# OSVmImage: ${{ variables.WINDOWSVMIMAGE}}
# PythonVersion: "3.10"
# Windows_Python313:
# OSName: "Windows"
# Pool: ${{ variables.WINDOWSPOOL }}
# OSVmImage: ${{ variables.WINDOWSVMIMAGE}}
# PythonVersion: "3.13"

pool:
name: $(Pool)
Expand Down
1 change: 0 additions & 1 deletion packages/autorest.python/autorest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from pygen import ReaderAndWriter, Plugin, YamlUpdatePlugin, OptionsDict
from .jsonrpc import AutorestAPI


_LOGGER = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion packages/autorest.python/autorest/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from .jsonrpc import AutorestAPI
from . import PluginAutorest


_LOGGER = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion packages/autorest.python/autorest/jsonrpc/localapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from . import AutorestAPI, Channel


_LOGGER = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion packages/autorest.python/autorest/jsonrpc/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from .stdstream import read_message, write_message


_LOGGER = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion packages/autorest.python/autorest/jsonrpc/stdstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from . import AutorestAPI, Channel


_LOGGER = logging.getLogger(__name__)


Expand Down
2 changes: 1 addition & 1 deletion packages/autorest.python/autorest/m2r.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# license information.
# --------------------------------------------------------------------------
"""An autorest MD to RST plugin."""

import logging
from typing import Any, Dict, Set, Union

Expand All @@ -12,7 +13,6 @@

from . import YamlUpdatePluginAutorest


_LOGGER = logging.getLogger(__name__)


Expand Down
4 changes: 2 additions & 2 deletions packages/autorest.python/autorest/m4reformatter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# license information.
# --------------------------------------------------------------------------
"""The modelerfour reformatter autorest plugin."""

import re
import copy
import logging
Expand All @@ -19,7 +20,6 @@
)
from .. import YamlUpdatePluginAutorest


ORIGINAL_ID_TO_UPDATED_TYPE: Dict[int, Dict[str, Any]] = {}
OAUTH_TYPE = "OAuth2"
KEY_TYPE = "Key"
Expand Down Expand Up @@ -748,7 +748,7 @@ def _update_content_type_parameter(
param["language"]["default"]["description"] = description
return param

def _update_parameters_helper(
def _update_parameters_helper( # pylint: disable=too-many-positional-arguments
self,
parameters: List[Dict[str, Any]],
body_parameter: Optional[Dict[str, Any]],
Expand Down
1 change: 1 addition & 0 deletions packages/autorest.python/autorest/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# license information.
# --------------------------------------------------------------------------
"""The preprocessing autorest plugin."""

from typing import Dict, Any
from pygen.preprocess import PreProcessPlugin
from . import YamlUpdatePluginAutorest
Expand Down
2 changes: 1 addition & 1 deletion packages/autorest.python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/Azure/autorest.python/blob/main/README.md",
"dependencies": {
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjE3ODYzNi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.28.3.tgz",
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjIyNTU3My9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.28.3.tgz",
"@autorest/system-requirements": "~1.0.2",
"fs-extra": "~11.2.0",
"tsx": "^4.21.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# --------------------------------------------------------------------------

from copy import deepcopy
import sys
from typing import Any, Optional, TYPE_CHECKING, cast
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse
Expand All @@ -21,6 +21,11 @@
from ._utils.serialization import Deserializer, Serializer
from .operations import HttpSuccessOperations, Operations, SelfDefineOperations

if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self # type: ignore

if TYPE_CHECKING:
from azure.core import AzureClouds
from azure.core.credentials import TokenCredential
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@
import xml.etree.ElementTree as ET

import isodate # type: ignore
from typing_extensions import Self

from azure.core.exceptions import DeserializationError, SerializationError
from azure.core.serialization import NULL as CoreNull

if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self

_BOM = codecs.BOM_UTF8.decode(encoding="utf-8")

JSON = MutableMapping[str, Any]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# --------------------------------------------------------------------------

from copy import deepcopy
import sys
from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import AsyncHttpResponse, HttpRequest
Expand All @@ -21,6 +21,11 @@
from ._configuration import PyprojectMgmtClientConfiguration
from .operations import HttpSuccessOperations, Operations, SelfDefineOperations

if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self # type: ignore

if TYPE_CHECKING:
from azure.core import AzureClouds
from azure.core.credentials_async import AsyncTokenCredential
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
keywords = ["azure", "azure sdk"]

dependencies = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# --------------------------------------------------------------------------

from copy import deepcopy
import sys
from typing import Any, Optional, TYPE_CHECKING, cast
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse
Expand All @@ -21,6 +21,11 @@
from ._utils.serialization import Deserializer, Serializer
from .operations import HttpSuccessOperations

if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self # type: ignore

if TYPE_CHECKING:
from azure.core import AzureClouds
from azure.core.credentials import TokenCredential
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""

from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@
import xml.etree.ElementTree as ET

import isodate # type: ignore
from typing_extensions import Self

from azure.core.exceptions import DeserializationError, SerializationError
from azure.core.serialization import NULL as CoreNull

if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self

_BOM = codecs.BOM_UTF8.decode(encoding="utf-8")

JSON = MutableMapping[str, Any]
Expand Down
Loading
Loading