Skip to content

Commit b5e0d84

Browse files
authored
[python] correctly deserialize xml errors (#3316)
* Update dependencies * Add changelog * Update dependencies (2026-01-29 01:49:13) * Regenerate for typespec-python (2026-01-29 01:54:57) * Regenerate for autorest.python (2026-01-29 02:09:43) --------- Co-authored-by: AutoPrFromHttpClientPython <AutoPrFromHttpClientPython>
1 parent 4a7ea63 commit b5e0d84

File tree

16 files changed

+87
-100
lines changed

16 files changed

+87
-100
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
changeKind: fix
3+
packages:
4+
- "@autorest/python"
5+
- "@azure-tools/typespec-python"
6+
---
7+
8+
Fix additional indentation issues
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
changeKind: fix
3+
packages:
4+
- "@autorest/python"
5+
- "@azure-tools/typespec-python"
6+
---
7+
8+
`_failsafe_deserialize_xml` xml errors

packages/autorest.python/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"homepage": "https://github.com/Azure/autorest.python/blob/main/README.md",
3131
"dependencies": {
32-
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTgwNDUwNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.26.0.tgz",
32+
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTgwOTQ5MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.26.0.tgz",
3333
"@autorest/system-requirements": "~1.0.2",
3434
"fs-extra": "~11.2.0",
3535
"tsx": "~4.19.1"

packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/aio/operations/_operations.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def __init__(self, *args, **kwargs) -> None:
5757

5858
@distributed_trace_async
5959
async def head_no_params(self, **kwargs: Any) -> JSON:
60-
"""Head request, no params.
61-
Initially has no query parameters. After evolution, a new optional query parameter is added.
60+
"""Head request, no params. Initially has no query parameters. After evolution, a new optional
61+
query parameter is added.
6262
6363
:return: JSON
6464
:rtype: JSON
@@ -106,9 +106,8 @@ async def head_no_params(self, **kwargs: Any) -> JSON:
106106

107107
@distributed_trace_async
108108
async def get_required(self, *, parameter: str, **kwargs: Any) -> JSON:
109-
"""Get true Boolean value on path.
110-
Initially only has one required Query Parameter. After evolution, a new optional query
111-
parameter is added.
109+
"""Get true Boolean value on path. Initially only has one required Query Parameter. After
110+
evolution, a new optional query parameter is added.
112111
113112
:keyword parameter: I am a required parameter. Required.
114113
:paramtype parameter: str
@@ -327,9 +326,8 @@ async def post_parameters(self, parameter: Union[JSON, IO[bytes]], **kwargs: Any
327326

328327
@distributed_trace_async
329328
async def get_optional(self, *, optional_param: Optional[str] = None, **kwargs: Any) -> JSON:
330-
"""Get true Boolean value on path.
331-
Initially has one optional query parameter. After evolution, a new optional query parameter is
332-
added.
329+
"""Get true Boolean value on path. Initially has one optional query parameter. After evolution, a
330+
new optional query parameter is added.
333331
334332
:keyword optional_param: I am an optional parameter. Default value is None.
335333
:paramtype optional_param: str

packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenInitialVersionTolerant/dpgservicedriveninitialversiontolerant/operations/_operations.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ def __init__(self, *args, **kwargs) -> None:
143143

144144
@distributed_trace
145145
def head_no_params(self, **kwargs: Any) -> JSON:
146-
"""Head request, no params.
147-
Initially has no query parameters. After evolution, a new optional query parameter is added.
146+
"""Head request, no params. Initially has no query parameters. After evolution, a new optional
147+
query parameter is added.
148148
149149
:return: JSON
150150
:rtype: JSON
@@ -192,9 +192,8 @@ def head_no_params(self, **kwargs: Any) -> JSON:
192192

193193
@distributed_trace
194194
def get_required(self, *, parameter: str, **kwargs: Any) -> JSON:
195-
"""Get true Boolean value on path.
196-
Initially only has one required Query Parameter. After evolution, a new optional query
197-
parameter is added.
195+
"""Get true Boolean value on path. Initially only has one required Query Parameter. After
196+
evolution, a new optional query parameter is added.
198197
199198
:keyword parameter: I am a required parameter. Required.
200199
:paramtype parameter: str
@@ -411,9 +410,8 @@ def post_parameters(self, parameter: Union[JSON, IO[bytes]], **kwargs: Any) -> J
411410

412411
@distributed_trace
413412
def get_optional(self, *, optional_param: Optional[str] = None, **kwargs: Any) -> JSON:
414-
"""Get true Boolean value on path.
415-
Initially has one optional query parameter. After evolution, a new optional query parameter is
416-
added.
413+
"""Get true Boolean value on path. Initially has one optional query parameter. After evolution, a
414+
new optional query parameter is added.
417415
418416
:keyword optional_param: I am an optional parameter. Default value is None.
419417
:paramtype optional_param: str

packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/aio/operations/_operations.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,8 @@ async def head_no_params(self, *, new_parameter: Optional[str] = None, **kwargs:
111111

112112
@distributed_trace_async
113113
async def get_required(self, *, parameter: str, new_parameter: Optional[str] = None, **kwargs: Any) -> JSON:
114-
"""Get true Boolean value on path.
115-
Initially only has one required Query Parameter. After evolution, a new optional query
116-
parameter is added.
114+
"""Get true Boolean value on path. Initially only has one required Query Parameter. After
115+
evolution, a new optional query parameter is added.
117116
118117
:keyword parameter: I am a required parameter. Required.
119118
:paramtype parameter: str
@@ -346,9 +345,8 @@ async def post_parameters(self, parameter: Union[JSON, IO[bytes]], **kwargs: Any
346345

347346
@distributed_trace_async
348347
async def delete_parameters(self, **kwargs: Any) -> None:
349-
"""Delete something.
350-
Initially the path exists but there is no delete method. After evolution this is a new method
351-
in a known path.
348+
"""Delete something. Initially the path exists but there is no delete method. After evolution this
349+
is a new method in a known path.
352350
353351
:return: None
354352
:rtype: None
@@ -391,9 +389,8 @@ async def delete_parameters(self, **kwargs: Any) -> None:
391389
async def get_optional(
392390
self, *, optional_param: Optional[str] = None, new_parameter: Optional[str] = None, **kwargs: Any
393391
) -> JSON:
394-
"""Get true Boolean value on path.
395-
Initially has one optional query parameter. After evolution, a new optional query parameter is
396-
added.
392+
"""Get true Boolean value on path. Initially has one optional query parameter. After evolution, a
393+
new optional query parameter is added.
397394
398395
:keyword optional_param: I am an optional parameter. Default value is None.
399396
:paramtype optional_param: str
@@ -447,9 +444,8 @@ async def get_optional(
447444

448445
@distributed_trace_async
449446
async def get_new_operation(self, **kwargs: Any) -> JSON:
450-
"""I'm a new operation.
451-
Initiallty neither path or method exist for this operation. After evolution, this is a new
452-
method in a new path.
447+
"""I'm a new operation. Initiallty neither path or method exist for this operation. After
448+
evolution, this is a new method in a new path.
453449
454450
:return: JSON
455451
:rtype: JSON

packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGServiceDrivenUpdateOneVersionTolerant/dpgservicedrivenupdateoneversiontolerant/operations/_operations.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,8 @@ def head_no_params(self, *, new_parameter: Optional[str] = None, **kwargs: Any)
231231

232232
@distributed_trace
233233
def get_required(self, *, parameter: str, new_parameter: Optional[str] = None, **kwargs: Any) -> JSON:
234-
"""Get true Boolean value on path.
235-
Initially only has one required Query Parameter. After evolution, a new optional query
236-
parameter is added.
234+
"""Get true Boolean value on path. Initially only has one required Query Parameter. After
235+
evolution, a new optional query parameter is added.
237236
238237
:keyword parameter: I am a required parameter. Required.
239238
:paramtype parameter: str
@@ -466,9 +465,8 @@ def post_parameters(self, parameter: Union[JSON, IO[bytes]], **kwargs: Any) -> J
466465

467466
@distributed_trace
468467
def delete_parameters(self, **kwargs: Any) -> None: # pylint: disable=inconsistent-return-statements
469-
"""Delete something.
470-
Initially the path exists but there is no delete method. After evolution this is a new method
471-
in a known path.
468+
"""Delete something. Initially the path exists but there is no delete method. After evolution this
469+
is a new method in a known path.
472470
473471
:return: None
474472
:rtype: None
@@ -511,9 +509,8 @@ def delete_parameters(self, **kwargs: Any) -> None: # pylint: disable=inconsist
511509
def get_optional(
512510
self, *, optional_param: Optional[str] = None, new_parameter: Optional[str] = None, **kwargs: Any
513511
) -> JSON:
514-
"""Get true Boolean value on path.
515-
Initially has one optional query parameter. After evolution, a new optional query parameter is
516-
added.
512+
"""Get true Boolean value on path. Initially has one optional query parameter. After evolution, a
513+
new optional query parameter is added.
517514
518515
:keyword optional_param: I am an optional parameter. Default value is None.
519516
:paramtype optional_param: str
@@ -567,9 +564,8 @@ def get_optional(
567564

568565
@distributed_trace
569566
def get_new_operation(self, **kwargs: Any) -> JSON:
570-
"""I'm a new operation.
571-
Initiallty neither path or method exist for this operation. After evolution, this is a new
572-
method in a new path.
567+
"""I'm a new operation. Initiallty neither path or method exist for this operation. After
568+
evolution, this is a new method in a new path.
573569
574570
:return: JSON
575571
:rtype: JSON

packages/typespec-python/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"js-yaml": "~4.1.0",
6868
"semver": "~7.6.2",
6969
"tsx": "~4.19.1",
70-
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTgwNDUwNy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.26.0.tgz",
70+
"@typespec/http-client-python": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNTgwOTQ5MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX3B5dGhvbg2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-python-0.26.0.tgz",
7171
"fs-extra": "~11.2.0"
7272
},
7373
"devDependencies": {

packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/aio/operations/_operations.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,7 @@ def __init__(self, *args, **kwargs) -> None:
545545

546546
@distributed_trace_async
547547
async def _operation(self, *, name: str, **kwargs: Any) -> _models._models.OuterModel:
548-
"""Expected query parameter: name="Madge"
549-
Expected response body:
548+
"""Expected query parameter: name="Madge" Expected response body:
550549
551550
.. code-block:: json
552551
@@ -615,8 +614,7 @@ async def _operation(self, *, name: str, **kwargs: Any) -> _models._models.Outer
615614

616615
@distributed_trace_async
617616
async def _discriminator(self, *, kind: str, **kwargs: Any) -> _models._models.AbstractModel:
618-
"""Expected query parameter: kind="real"
619-
Expected response body:
617+
"""Expected query parameter: kind="real" Expected response body:
620618
621619
.. code-block:: json
622620

packages/typespec-python/test/azure/generated/azure-client-generator-core-access/specs/azure/clientgenerator/core/access/operations/_operations.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,7 @@ def __init__(self, *args, **kwargs) -> None:
714714

715715
@distributed_trace
716716
def _operation(self, *, name: str, **kwargs: Any) -> _models._models.OuterModel:
717-
"""Expected query parameter: name="Madge"
718-
Expected response body:
717+
"""Expected query parameter: name="Madge" Expected response body:
719718
720719
.. code-block:: json
721720
@@ -784,8 +783,7 @@ def _operation(self, *, name: str, **kwargs: Any) -> _models._models.OuterModel:
784783

785784
@distributed_trace
786785
def _discriminator(self, *, kind: str, **kwargs: Any) -> _models._models.AbstractModel:
787-
"""Expected query parameter: kind="real"
788-
Expected response body:
786+
"""Expected query parameter: kind="real" Expected response body:
789787
790788
.. code-block:: json
791789

0 commit comments

Comments
 (0)