You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Install orjson with the logging and *-all extras where it has wheels #339
lite-bootstrap renders log lines with orjson when it is installed and falls back to stdlib json otherwise (lite_bootstrap/instruments/logging_factory.py:48-51). Only the separate orjson extra installs it (pyproject.toml, orjson>=3.8.0 since #328); logging is structlog only and no *-all extra pulls it. So a default lite-bootstrap[fastapi-all] install takes the slower path.
Measured on 2026-10-24 at 705d8a3 on Linux with 2 CPUs (CPython 3.14.9, output to /dev/null, 50000 calls per round): a log.info(...) call through lite-bootstrap's chain costs 9.5 µs with orjson and 11.5 µs with stdlib json, about 2 µs per log call. In isolation JSONRenderer costs 0.49 µs with orjson against 2.16 µs with compact stdlib json. The tables and scripts are to be published with #335.
The blocker is ADR-0004. orjson has no free-threaded wheels and refuses to build on a free-threaded interpreter, and the ADR records that "PEP 508 has no environment marker for 'GIL enabled', so neither can be required conditionally". That is why orjson is opt-in today. Adding it to logging and the *-all extras needs a marker that skips free-threaded builds, and the ADR says there is none. Also, orjson 3.13.0 (the newest on PyPI on 2026-10-24) ships cp314 wheels but none for cp314t or cp315.
Work
First establish whether a marker exists now: check the current dependency-specifier spec on packaging.python.org and the status of any PEP adding an ABI-feature marker, and whether pip and uv both evaluate it. Record the answer here before writing code.
If one exists: add orjson>=3.8.0; <marker for GIL-enabled builds> to logging and to each *-all extra, supersede ADR-0004's orjson half with a new ADR, and add a step to the free-threaded CI job that installs logging and checks that orjson is absent. Consider also excluding interpreters orjson has no wheel for (3.15 today), or say why a source build there is acceptable.
If none exists: close this issue, and add one sentence to docs/introduction/installation.md recommending [orjson] next to [logging] on GIL builds, with the 2 µs figure.
Verify: on CPython 3.14, uv pip install lite-bootstrap[fastapi-all] installs orjson; on 3.14t the same install succeeds without it; the suite passes on both.
Not breaking: the GIL fast path is byte-for-byte the same output (ADR-0004), and free-threaded installs are unchanged.
Activity