Skip to content

docs: replace deprecated ujson with orjson in client quickstart#12152

Merged
Dreamsorcerer merged 2 commits intoaio-libs:masterfrom
indoor47:fix/replace-deprecated-ujson-docs-refs
Feb 27, 2026
Merged

docs: replace deprecated ujson with orjson in client quickstart#12152
Dreamsorcerer merged 2 commits intoaio-libs:masterfrom
indoor47:fix/replace-deprecated-ujson-docs-refs

Conversation

@indoor47
Copy link
Contributor

Fixes #10795.

The ujson library has been placed in maintenance-only mode. Its own maintainers now recommend migrating to orjson (source):

UltraJSON's architecture is fundamentally ill-suited to making changes without risk of introducing new security vulnerabilities. Users are encouraged to migrate to orjson which is both much faster and less likely to introduce a surprise buffer overflow vulnerability in the future.

Changes

docs/client_quickstart.rst: Replaced the ujson code example with orjson. Since orjson.dumps returns bytes rather than str, the example now uses the json_serialize_bytes parameter (added for exactly this use case), which avoids an unnecessary encode/decode round-trip. Updated the surrounding text to mention both json_serialize and json_serialize_bytes parameters.

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.

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.
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Feb 27, 2026
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.77%. Comparing base (6e8f393) to head (6690d0c).
⚠️ Report is 4 commits behind head on master.
✅ All tests successful. No failed tests found.

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              
Flag Coverage Δ
CI-GHA 98.63% <ø> (-0.01%) ⬇️
OS-Linux 98.38% <ø> (-0.01%) ⬇️
OS-Windows 96.74% <ø> (-0.01%) ⬇️
OS-macOS 97.63% <ø> (+<0.01%) ⬆️
Py-3.10.11 97.18% <ø> (ø)
Py-3.10.19 97.66% <ø> (ø)
Py-3.11.14 97.86% <ø> (ø)
Py-3.11.9 97.39% <ø> (-0.01%) ⬇️
Py-3.12.10 97.48% <ø> (ø)
Py-3.12.12 97.95% <ø> (ø)
Py-3.13.12 98.20% <ø> (ø)
Py-3.14.3 98.16% <ø> (-0.01%) ⬇️
Py-3.14.3t 97.26% <ø> (-0.01%) ⬇️
Py-pypy3.11.13-7.3.20 97.29% <ø> (ø)
VM-macos 97.63% <ø> (+<0.01%) ⬆️
VM-ubuntu 98.38% <ø> (-0.01%) ⬇️
VM-windows 96.74% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 27, 2026

Merging this PR will not alter performance

✅ 59 untouched benchmarks


Comparing indoor47:fix/replace-deprecated-ujson-docs-refs (6690d0c) with master (6e8f393)

Open in CodSpeed

@Dreamsorcerer Dreamsorcerer added backport-3.13 Trigger automatic backporting to the 3.13 release branch by Patchback robot backport-3.14 Trigger automatic backporting to the 3.14 release branch by Patchback robot labels Feb 27, 2026
@Dreamsorcerer Dreamsorcerer merged commit c1981ef into aio-libs:master Feb 27, 2026
44 of 45 checks passed
@patchback
Copy link
Contributor

patchback bot commented Feb 27, 2026

Backport to 3.13: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.13/c1981efd5f751b95f3569e956b6ee91f314aa7cb/pr-12152

Backported as #12161

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@patchback
Copy link
Contributor

patchback bot commented Feb 27, 2026

Backport to 3.14: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.14/c1981efd5f751b95f3569e956b6ee91f314aa7cb/pr-12152

Backported as #12162

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-3.13 Trigger automatic backporting to the 3.13 release branch by Patchback robot backport-3.14 Trigger automatic backporting to the 3.14 release branch by Patchback robot bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ujson library mentioned in the documentation is deprecated

2 participants