Open
Description
- Package Name: azure-cosmos
- Package Version: 4.9.0
- Operating System: macOs 15.4 (Apple M3)
- Python Version: 3.11
Describe the bug
when calling upsert_item to save a document, if the document includes non-ascii characters, an exception will be raised, which is
unsupported Unicode escape sequence
To Reproduce
Steps to reproduce the behavior:
- Create a test container "Users"
- Call upsert_item to save data like {"id": "1234", "partitionId": "London", "name": "なかむらし"}
Expected behavior
The document has non-ascii characters that should be saved successfully
Additional context
I believe the root cause is the implementation of _request_body_from_data function in _synchronized_request.py, which should use json.dumps with ensure-ascii=False
Metadata
Metadata
Assignees
Labels
This issue points to a problem in the data-plane of the library.Workflow: This issue is responsible by Azure service team.Issues that are reported by GitHub users external to the Azure organization.Workflow: This issue needs attention from Azure service team or SDK teamThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Type
Projects
Status
No status