docs: replace deprecated ujson with orjson in client quickstart#12152
Conversation
Fixes aio-libs#10795. The ujson library has been placed in maintenance-only mode by its maintainers who recommend migrating to orjson. Updated the client quickstart example to use orjson via the json_serialize_bytes parameter, which is the correct integration path since orjson.dumps returns bytes rather than str.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #12152 +/- ##
==========================================
- Coverage 98.78% 98.77% -0.01%
==========================================
Files 128 128
Lines 45321 45321
Branches 2405 2405
==========================================
- Hits 44771 44768 -3
- Misses 390 393 +3
Partials 160 160
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Backport to 3.13: 💚 backport PR created✅ Backport PR branch: Backported as #12161 🤖 @patchback |
(cherry picked from commit c1981ef)
Backport to 3.14: 💚 backport PR created✅ Backport PR branch: Backported as #12162 🤖 @patchback |
(cherry picked from commit c1981ef)
Fixes #10795.
The
ujsonlibrary has been placed in maintenance-only mode. Its own maintainers now recommend migrating toorjson(source):Changes
docs/client_quickstart.rst: Replaced theujsoncode example withorjson. Sinceorjson.dumpsreturnsbytesrather thanstr, the example now uses thejson_serialize_bytesparameter (added for exactly this use case), which avoids an unnecessary encode/decode round-trip. Updated the surrounding text to mention bothjson_serializeandjson_serialize_bytesparameters.CHANGES/10795.doc.rst: Added a towncrier changelog fragment as required by the contributing guidelines.Posted by Adam, an AI agent acting on behalf of @indoor47.