Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.
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
4 changes: 2 additions & 2 deletions autorest/codegen/models/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ def imports_for_multiapi(self, async_mode: bool) -> FileImport:
pass
return file_import

def send_request_signature(self, async_mode: bool, is_python3_file: bool) -> List[str]:
request_signature = ["request: HttpRequest," if async_mode else "request, # type: HttpRequest"]
def send_request_signature(self, is_python3_file: bool) -> List[str]:
request_signature = ["request: HttpRequest," if is_python3_file else "request, # type: HttpRequest"]
return request_signature + self.parameters.method_signature_kwargs(is_python3_file)
2 changes: 1 addition & 1 deletion autorest/codegen/serializers/client_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _send_request_signature(self, async_mode: bool) -> str:
method_name=self.code_model.send_request_name,
is_in_class=True,
method_param_signatures=self.code_model.service_client.send_request_signature(
async_mode, async_mode or self.is_python3_file
async_mode or self.is_python3_file
),
)

Expand Down
16 changes: 8 additions & 8 deletions eng/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pr:

variables:
NodeVersion: "12.x"
PythonVersion: "3.6"
PythonVersion: "3.7"
TestFolder: "$(Build.SourcesDirectory)/test/"
AUTOREST_TESTSERVER_COVERAGE_DIRECTORY: "$(Build.SourcesDirectory)/coverage/"

Expand All @@ -31,10 +31,10 @@ jobs:
OSName: "Linux"
OSVmImage: "MMSUbuntu20.04"
PythonVersion: "2.7"
Linux_Python36:
Linux_Python37:
OSName: "Linux"
OSVmImage: "MMSUbuntu20.04"
PythonVersion: "3.6"
PythonVersion: "3.7"
CoverageArg: ""
Linux_Python310:
OSName: "Linux"
Expand All @@ -52,9 +52,9 @@ jobs:
versionSpec: "$(NodeVersion)"

- task: UsePythonVersion@0
displayName: "Use Python 3.6"
displayName: "Use Python 3.7"
inputs:
versionSpec: 3.6
versionSpec: 3.7

- script: |
cd $(Build.SourcesDirectory)
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
cd $(TestFolder)/azure/version-tolerant
tox -e lint
displayName: 'Lint version-tolerant "azure" Tests - Python $(PythonVersion)'
condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.6'))
condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7'))

- script: |
cd $(TestFolder)/vanilla/legacy
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
cd $(TestFolder)/vanilla/version-tolerant
tox -e lint
displayName: 'Lint version-tolerant "vanilla" Tests - Python $(PythonVersion)'
condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.6'))
condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7'))

- script: |
cd $(TestFolder)/llc/low-level
Expand All @@ -184,7 +184,7 @@ jobs:
cd $(TestFolder)/llc/version-tolerant
tox -e lint
displayName: 'Lint version-tolerant "llc" Tests - Python $(PythonVersion)'
condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.6'))
condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.7'))
- script: |
cd $(TestFolder)/multiapi
tox -e ci
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ def __init__(self, *, endpoint: str = "http://localhost:3000", **kwargs: Any) ->
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `bodydurationlowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ def __init__(self, *, endpoint: str = "http://localhost:3000", **kwargs: Any) ->
self._serialize = Serializer()
self._deserialize = Deserializer()

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `azureparametergroupinglowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ def __init__(self, *, endpoint: str = "http://localhost:3000", **kwargs: Any) ->
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `azurereportlowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ def __init__(
self._serialize = Serializer()
self._deserialize = Deserializer()

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `azurespecialpropertieslowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ def __init__(self, host: str = "host", **kwargs: Any) -> None:
self._serialize = Serializer()
self._deserialize = Deserializer()

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `custombaseurllowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ def __init__(self, host: str = "host", **kwargs: Any) -> None:
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `custombaseurlpaginglowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ def __init__(
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `headexceptionslowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ def __init__(
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `headlowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ def __init__(
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `lrolowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ def __init__(self, host: str = "host", **kwargs: Any) -> None:
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `lrowithparameterizedendpointslowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ def __init__(self, *, endpoint: str = "http://localhost:3000", **kwargs: Any) ->
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `paginglowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ def __init__(
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `storagelowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ def __init__(
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

We have helper methods to create requests specific to this service in `subscriptionidapiversionlowlevel.rest`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ def __init__(self, *, endpoint: str = "http://localhost:3000", **kwargs: Any) ->
self._serialize.client_side_validation = False
self.duration = DurationOperations(self._client, self._config, self._serialize, self._deserialize)

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ def __init__(self, *, endpoint: str = "http://localhost:3000", **kwargs: Any) ->
self._client, self._config, self._serialize, self._deserialize
)

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ def __init__(self, *, endpoint: str = "http://localhost:3000", **kwargs: Any) ->
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,7 @@ def __init__(
self.odata = OdataOperations(self._client, self._config, self._serialize, self._deserialize)
self.header = HeaderOperations(self._client, self._config, self._serialize, self._deserialize)

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ def __init__(self, host: str = "host", **kwargs: Any) -> None:
self._deserialize = Deserializer()
self.paths = PathsOperations(self._client, self._config, self._serialize, self._deserialize)

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ def __init__(
self._serialize.client_side_validation = False
self.paging = PagingOperations(self._client, self._config, self._serialize, self._deserialize)

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ def __init__(self, host: str = "host", **kwargs: Any) -> None:
self._serialize.client_side_validation = False
self.paging = PagingOperations(self._client, self._config, self._serialize, self._deserialize)

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ def __init__(
self._serialize.client_side_validation = False
self.head_exception = HeadExceptionOperations(self._client, self._config, self._serialize, self._deserialize)

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ def __init__(
self._serialize.client_side_validation = False
self.http_success = HttpSuccessOperations(self._client, self._config, self._serialize, self._deserialize)

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ def __init__(self, host: str = "host", **kwargs: Any) -> None:
self._deserialize = Deserializer()
self._serialize.client_side_validation = False

def send_request(
self,
request, # type: HttpRequest
**kwargs: Any
) -> HttpResponse:
def send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.

>>> from azure.core.rest import HttpRequest
Expand Down
Loading