Use zstandard implementation from stdlib (PEP-784) #3725
All Vouch review confidence checks passed
Residual risk 0.12 = Change Risk (0.38) × (1 − Review Confidence (0.68)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.38 · 40 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.54 · 2 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.222
Real PR Conversation Timeline
4 items
Hello @mbeijen, as the author of Zstandard support in httpx your review would be appreciated! :hugs:
Thanks for your work, this looks great (esp. together with #3726 !!!)
Approved
Approved these changes.
mbeijen
Rogdham
<!-- Thanks for contributing to HTTPX! 💚
Given this is a project maintained by volunteers, please read this template to not waste your time, or ours! 😁 -->
Summary
Context
Thanks to PEP-784, Zstandard is included in Python starting from version 3.14 with the
compression.zstdmodule.So for Python 3.14+, we don't need an external lib. For older version of Python, I'm using
backports.zstdwhich exposes the same API as stdlib.This also means that users of Python 3.14+ will benefit from Zstandard support even if they install
httpxinstead ofhttpx[zstd].A similar change has been adopted in various other libraries already, such as
urllib3from version 2.6.0._Full disclosure: I'm the author and maintainer of
backports.zstd, and the maintainer ofpyzstd(which code was used as a base for the integration into Python). I also helped with PEP-784 and its integration into CPython._Checklist