Skip to content

Comments

[Python] Enhance XML deserialization logic for model_base template#9637

Closed
annatisch wants to merge 2 commits intomainfrom
annatisch-patch-1
Closed

[Python] Enhance XML deserialization logic for model_base template#9637
annatisch wants to merge 2 commits intomainfrom
annatisch-patch-1

Conversation

@annatisch
Copy link
Member

No description provided.

Add support for additional deserializer types in model_base.py.jinja2.
@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Feb 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

@typespec/http-client-python - fix ✏️

[Python] Enhance XML deserialization logic in model_base template

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 9, 2026

Open in StackBlitz

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http@9637
npm i https://pkg.pr.new/microsoft/typespec/@typespec/http-client@9637

commit: fc5db38

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 9, 2026

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@@ -1020,11 +1020,15 @@ def _deserialize_with_callable(
return float(value.text) if value.text else None
if deserializer is bool:
Copy link
Member

@l0lawrence l0lawrence Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we add ->

else:
dict_to_pass[rf._rest_name] = []

on line 635? If an unwrapped element is an empty array do we return None or []?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@annatisch annatisch closed this Feb 24, 2026
@annatisch annatisch deleted the annatisch-patch-1 branch February 24, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants