v0.0.3 - sendfile, and telemetry that arms late
📁 sendfile
zuvloop 0.0.3 implements the two loop methods that previously raised NotImplementedError.
pip install zuvloop==0.0.3sendfile()andsock_sendfile()use thesendfile(2)system call (#53) - the kernel moves the bytes, nothing is copied through Python. Forsendfile(transport, ...)the loop first lets the transport's buffered writes drain and pauses reading, so the file cannot reorder around data written before it; readiness is polled through a duplicate of the descriptor, since libuv allows one handle per descriptor.- Targets the syscall cannot serve fall back to a read-and-write loop - a
BytesIO, a TLS transport, a pipe - or raise underfallback=False, matching asyncio. On macOS,sendfile(2)does not serve AF_UNIX sockets, so unix connections take the fallback there transparently (native on Linux).
🔭 Telemetry survives late configuration
- OpenTelemetry providers installed after the loop starts are now noticed (#54). Slow-callback monitoring and the loop gauges were armed once, at
run_forever()entry - an application callinglogfire.configure()from insidemain()silently lost both for the life of the process. The loop's unreferenced native sampler now doubles as the re-check: monitoring arms within onemetrics_interval(10s by default) of a provider appearing, the answer is latched so the probe stops once it says yes, and uninstrumented programs keep the native fast path with no per-callback clock reads. - Slow-callback spans are warnings now, not errors (#54). OpenTelemetry span status has no warning level, so the status stays unset and the severity travels as a
logfire.level_numattribute, which backends that do not know it ignore.
🏗️ Release plumbing
- The version now comes from the git tag (#52) via
hatch-vcs; publishing this release is what stamps 0.0.3 onto the wheels.