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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- Node 20+
- pnpm 9+
- Python 3.8+
- Python 3.9+

## Develop

Expand Down
24 changes: 12 additions & 12 deletions eng/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,27 @@ jobs:

strategy:
matrix:
Linux_Python38:
Linux_Python3.9:
OSName: "Linux"
OSVmImage: "MMSUbuntu18.04"
PythonVersion: "3.8"
Windows_Python38:
PythonVersion: "3.9"
Windows_Python3.9:
OSName: "Windows"
OSVmImage: "MMS2020"
PythonVersion: "3.8"
Linux_Python310:
PythonVersion: "3.9"
Linux_Python3.10:
OSName: "Linux"
OSVmImage: "MMSUbuntu20.04"
PythonVersion: "3.10"
Linux_Python311:
Linux_Python3.11:
OSName: "Linux"
OSVmImage: "MMSUbuntu22.04"
PythonVersion: "3.11"
Linux_Python312:
Linux_Python3.12:
OSName: "Linux"
OSVmImage: "MMSUbuntu22.04"
PythonVersion: "3.12"
Windows_Python312:
Windows_Python3.12:
OSName: "Windows"
OSVmImage: "MMS2023"
PythonVersion: "3.12"
Expand Down Expand Up @@ -137,14 +137,14 @@ jobs:

strategy:
matrix:
Linux_Python38:
Linux_Python3.9:
OSName: "Linux"
OSVmImage: "MMSUbuntu18.04"
PythonVersion: "3.8"
Windows_Python38:
PythonVersion: "3.9"
Windows_Python3.9:
OSName: "Windows"
OSVmImage: "MMS2020"
PythonVersion: "3.8"
PythonVersion: "3.9"
Linux_Python310:
OSName: "Linux"
OSVmImage: "MMSUbuntu20.04"
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 -- --command=lint --folder=${{ parameters.folderName }}
displayName: Lint ${{ parameters.folderName }} - Python $(PythonVersion) --folder=${{ parameters.folderName }}
workingDirectory: $(Build.SourcesDirectory)/autorest.python/packages/${{parameters.package}}
condition: and(eq(variables['PythonVersion'], '3.8'), or(contains( '${{ parameters.folderName }}', 'version-tolerant'), eq('${{parameters.package}}', 'typespec-python')))
condition: and(eq(variables['PythonVersion'], '3.9'), or(contains( '${{ parameters.folderName }}', 'version-tolerant'), eq('${{parameters.package}}', 'typespec-python')))

- script: npm run test -- --command=mypy --folder=${{ parameters.folderName }}
displayName: Mypy ${{ parameters.folderName }} - Python $(PythonVersion)
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.8"
PythonVersion: "3.9"
TestFolder: "$(Build.SourcesDirectory)/test/"

pool:
Expand All @@ -16,9 +16,9 @@ steps:
versionSpec: "$(NodeVersion)"

- task: UsePythonVersion@0
displayName: "Use Python 3.8"
displayName: "Use Python 3.9"
inputs:
versionSpec: 3.8
versionSpec: 3.9

- 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.8",
"--py-version=3.9",
str(inner_class.absolute()),
]
)
Expand All @@ -49,7 +49,7 @@ def _single_dir_pylint(mod):


if __name__ == "__main__":
if sys.version_info >= (3, 9, 0):
# only run pylint with python 3.8
if sys.version_info >= (3, 10, 0):
# only run pylint with python 3.9
sys.exit(0)
run_check("pylint", _single_dir_pylint, "Pylint")
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": "~0.9.1",
"@typespec/http-client-python": "~0.9.2-dev.1",
"@autorest/system-requirements": "~1.0.2",
"fs-extra": "~11.2.0",
"tsx": "~4.19.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/autorest.python/run-python3.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const cp = require("child_process");
const extension = require("@autorest/system-requirements");

async function runPython3(scriptName, ...args) {
const command = await extension.patchPythonPath(["python", scriptName, ...args], { version: ">=3.8", environmentVariable: "AUTOREST_PYTHON_EXE" });
const command = await extension.patchPythonPath(["python", scriptName, ...args], { version: ">=3.9", environmentVariable: "AUTOREST_PYTHON_EXE" });
cp.execSync(command.join(" "), {
stdio: [0, 1, 2]
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from collections.abc import MutableMapping
import datetime
from io import IOBase
import sys
from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload

from azure.core import AsyncPipelineClient
Expand Down Expand Up @@ -101,10 +101,6 @@
)
from .._configuration import AutoRestSwaggerBATArrayServiceConfiguration

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from collections.abc import MutableMapping
import datetime
from io import IOBase
import sys
from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload

from azure.core import PipelineClient
Expand All @@ -30,10 +30,6 @@
from .._configuration import AutoRestSwaggerBATArrayServiceConfiguration
from .._serialization import Deserializer, Serializer

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from collections.abc import MutableMapping
import datetime
from io import IOBase
import sys
from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload

from azure.core import AsyncPipelineClient
Expand Down Expand Up @@ -100,10 +100,6 @@
)
from .._configuration import AutoRestSwaggerBATArrayServiceConfiguration

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from collections.abc import MutableMapping
import datetime
from io import IOBase
import sys
from typing import Any, Callable, Dict, IO, List, Optional, TypeVar, Union, overload

from azure.core import PipelineClient
Expand All @@ -29,10 +29,6 @@
from .._configuration import AutoRestSwaggerBATArrayServiceConfiguration
from .._serialization import Deserializer, Serializer

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from collections.abc import MutableMapping
from typing import Any, Callable, Dict, Optional, TypeVar

from azure.core import AsyncPipelineClient
Expand All @@ -29,10 +29,6 @@
)
from .._configuration import AutoRestHeadTestServiceConfiguration

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from collections.abc import MutableMapping
from typing import Any, Callable, Dict, Optional, TypeVar

from azure.core import PipelineClient
Expand All @@ -24,10 +24,6 @@
from .._configuration import AutoRestHeadTestServiceConfiguration
from .._serialization import Deserializer, Serializer

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from collections.abc import MutableMapping
from typing import Any, Callable, Dict, Optional, TypeVar

from azure.core import AsyncPipelineClient
Expand All @@ -29,10 +29,6 @@
)
from .._configuration import AutoRestHeadTestServiceConfiguration

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from collections.abc import MutableMapping
from typing import Any, Callable, Dict, Optional, TypeVar

from azure.core import PipelineClient
Expand All @@ -24,10 +24,6 @@
from .._configuration import AutoRestHeadTestServiceConfiguration
from .._serialization import Deserializer, Serializer

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from collections.abc import MutableMapping
from io import IOBase
import sys
from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload

from my.library import CustomDefaultPollingMethod, CustomPager, CustomPoller
Expand All @@ -30,11 +30,7 @@
from .._serialization import Serializer
from .._vendor import PollingPagingExampleMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
JSON = MutableMapping[str, Any]
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from collections.abc import MutableMapping
from io import IOBase
import sys
from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload

from my.library.aio import AsyncCustomDefaultPollingMethod, AsyncCustomPager, AsyncCustomPoller
Expand Down Expand Up @@ -36,11 +36,7 @@
)
from .._vendor import PollingPagingExampleMixinABC

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
JSON = MutableMapping[str, Any]
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from collections.abc import MutableMapping
from typing import Any, Callable, Dict, Optional, TypeVar

from azure.core import AsyncPipelineClient
Expand All @@ -26,10 +26,6 @@
from ...operations._http_success_operations import build_head200_request, build_head204_request, build_head404_request
from .._configuration import AutoRestHeadTestServiceConfiguration

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from collections.abc import MutableMapping
from typing import Any, Callable, Dict, Optional, TypeVar

from azure.core import PipelineClient
Expand All @@ -25,10 +25,6 @@
from .._configuration import AutoRestHeadTestServiceConfiguration
from .._serialization import Deserializer, Serializer

if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]

Expand Down
Loading
Loading