Repository navigation
tl;dr
Breaking changes
- Zero-copy binary output: response bodies, stream chunks, WebSocket binary fields, and peer certificates now return read-only
memoryviewobjects instead ofbytes, avoiding an extra copy into Python-owned bytes. Usebytes(view)orview.tobytes()when abytesobject is required.
Highlights
- Added Chrome 154 emulation.
- Added configurable Runtime support for async and blocking clients, including worker counts and work-stealing settings.
- Improved async and blocking request and streaming performance.
- Added
async withsupport for request results. Response context managers now preserve connection reuse after the body is fully consumed. - Improved cancellation, upload error propagation, resource cleanup, and interpreter shutdown handling.
- Added PyPy 3.11 wheels and expanded HTTPS benchmarks with separate blocking MT/ST results.
benchmark: https://python.wreq.org/en/latest/benchmark/
What's Changed
- ci: add PyPy 3.11 wheel support by @egorsmkv in #620
- feat(buffer): return read-only memoryviews by @0x676e67 in #624
- fix(client): propagate synchronous upload iterator errors by @0x676e67 in #625
- docs(response): clarify close and streaming ownership by @0x676e67 in #626
- feat(runtime): support custom client runtimes by @0x676e67 in #623
- fix(client): guard library error formatting during shutdown by @0x676e67 in #628
- feat(emulate): add Chrome154 and Firefox152 profiles by @0x676e67 in #629
- perf(aio): speed up async requests and streams by @0x676e67 in #630
- fix: release abandoned uploads and fallback wake ports by @0x676e67 in #631
- feat(bench): add HTTPS benchmark matrix and documentation homepage by @0x676e67 in #632
- fix(docs): isolate benchmark tests and refine dark theme by @0x676e67 in #633
- perf(client): speed up blocking requests and add async with by @0x676e67 in #634
- fix(coroutine): handle cancelled ws reads and async bodies by @0x676e67 in #635
New Contributors
Full Changelog: v0.12.3...v0.13.0