-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow serialize_to_str to work with non ascii when dumping via json.d… #2714
Conversation
An update on my question... I've tested my GroupChat code with and without the So, for the purposes of serialising messages for saving GroupChat messages and resuming from it, it's not necessary to change the code I suggested. |
@marklysze Are you sure it went through similar code paths? In my PR, I added a unit test that shows if ensure_ascii is not used, it will change the formatting. |
The PR I wrote is still valid, can someone review the PRs please. |
Hi @jtoy, I used it to save to a file, then load from the file, and back into messages and without Your scenario may be different to mine so I think, as you are doing, you should continue with the PR, I just didn't see it affect the code section I referenced. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2714 +/- ##
==========================================
+ Coverage 33.60% 40.54% +6.94%
==========================================
Files 87 87
Lines 9336 9386 +50
Branches 1987 2154 +167
==========================================
+ Hits 3137 3806 +669
+ Misses 5933 5229 -704
- Partials 266 351 +85
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…umps (microsoft#2714) Co-authored-by: Jason <jtoy@grids.local> Co-authored-by: Chi Wang <wang.chi@microsoft.com>
allow serialize_to_str to work with non ascii when dumping via json.dumps
Why are these changes needed?
developers will use serialize_to_str with non ascii characters, this allows them to do that.
Related issue number
Closes #2511
Checks