Skip to content
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: internal
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Add mock API tests for `service/multiple-services` scenario (multiple services without explicit `@client`).
8 changes: 8 additions & 0 deletions .chronus/changes/python-headersFix-2026-3-9-15-51-55.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: fix
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Pass `headers` kwarg through to next requests in paging calls
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: fix
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Fix padding of keys in splatted body parameter method signature
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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjEyODg2My9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjEzMzMwNC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/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
3 changes: 3 additions & 0 deletions packages/typespec-python/eng/scripts/regenerate-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ export const BASE_AZURE_EMITTER_OPTIONS: Record<string, Record<string, string> |
"service/multi-service": {
namespace: "service.multiservice",
},
"service/multiple-services": {
namespace: "service.multipleservices",
},
};

export const BASE_EMITTER_OPTIONS: Record<string, Record<string, string> | Record<string, string>[]> = {
Expand Down
2 changes: 1 addition & 1 deletion packages/typespec-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@typespec/xml": ">=0.81.0 <1.0.0"
},
"dependencies": {
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjEyODg2My9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/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/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNjEzMzMwNC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.28.3.tgz",
"fs-extra": "~11.2.0",
"js-yaml": "~4.1.0",
"semver": "~7.6.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url, **path_format_arguments)

else:
_request = HttpRequest("POST", next_link)
_request = HttpRequest("POST", next_link, headers=_headers)
path_format_arguments = {
"endpoint": self._serialize.url(
"self._config.endpoint", self._config.endpoint, "str", skip_quote=True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url, **path_format_arguments)

else:
_request = HttpRequest("POST", next_link)
_request = HttpRequest("POST", next_link, headers=_headers)
path_format_arguments = {
"endpoint": self._serialize.url(
"self._config.endpoint", self._config.endpoint, "str", skip_quote=True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -198,7 +201,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -288,7 +294,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -467,7 +476,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -552,7 +564,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -648,7 +663,10 @@ def prepare_request(next_link=None):
"include_pending", include_pending, "bool"
)
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -732,7 +750,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -333,7 +336,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -421,7 +427,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -600,7 +609,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -685,7 +697,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -781,7 +796,10 @@ def prepare_request(next_link=None):
"include_pending", include_pending, "bool"
)
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -865,7 +883,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url, **path_format_arguments)

else:
_request = HttpRequest("GET", next_link)
_request = HttpRequest("GET", next_link, headers=_headers)
path_format_arguments = {
"endpoint": self._serialize.url(
"self._config.endpoint", self._config.endpoint, "str", skip_quote=True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url, **path_format_arguments)

else:
_request = HttpRequest("GET", next_link)
_request = HttpRequest("GET", next_link, headers=_headers)
path_format_arguments = {
"endpoint": self._serialize.url(
"self._config.endpoint", self._config.endpoint, "str", skip_quote=True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -1400,7 +1403,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down Expand Up @@ -1718,7 +1721,10 @@ def prepare_request(next_link=None):
)
_next_request_params["api-version"] = self._config.api_version
_request = HttpRequest(
"GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
"GET",
urllib.parse.urljoin(next_link, _parsed_next_link.path),
headers=_headers,
params=_next_request_params,
)
path_format_arguments = {
"endpoint": self._serialize.url(
Expand Down
Loading
Loading