Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
[Unreleased]¶
Features¶
- toon (v0.6.0): the module now implements TOON 4.4 end-to-end, with the encoder and decoder rebuilt on the reference algorithms. All 564 official conformance fixtures pass (up from 359/564) and
toon/conformance_baseline.jsonis empty;bench-toonmoves totoon-python@91413d14(spec 4.4). The pre-4.0lengthMarkeroption was removed by the specification: encoders never emit[#N], decoders reject it, and passing the option raisesValueError. (#184) - httpclient (v0.6.0): the module-level helpers now reuse connections.
get(),post()and friends (async_get(), …) share a process-wide pool instead of opening a connection per call — measured against the keep-alive server, sequentialget()went from ~990 to ~1900 requests/s with three connections for 300 requests. Async pools are per event loop, since pooled streams belong to the loop that created them.close_pools()/aclose_pools()release them. A pooled connection the server closed while idle is detected before use (socket peek, asyncat_eof()), andGET/HEAD/OPTIONS/PUT/DELETEare retried once on a fresh connection if the race is lost. The pool key now includesverify, so a connection built withverify=Falseis never handed to a verifying request. Idle sockets are also bounded: at mostDEFAULT_MAX_TOTAL_CONNECTIONS(100) are kept across all hosts, the oldest is evicted first, and entries idle beyond the pool timeout are swept on the next release, so talking to many hosts cannot pin one socket each. Both the cap and the idle window are per client (max_total_connections,pool_idle_timeout). - httpclient:
on_timingreports request milestones —request_started,headers_received(time to first byte) andbody_complete— as(event, elapsed)seconds on a monotonic clock. The module-level helpers andClient/AsyncClientaccept it; streaming responses reportbody_completewhen the body is consumed rather than when the stream is opened, and redirects reportheaders_receivedper hop. (#172)
Features¶
- httpserver (v0.6.0): connections now serve more than one request. HTTP/1.1 stays alive unless the request or the response sends
Connection: close(matched case-insensitively); HTTP/1.0 stays alive only when the request asks for it; an unrecognised protocol version closes; streaming responses still close. NewApp(keep_alive=..., keep_alive_timeout=..., max_requests_per_connection=...)options tune or disable it.keep_alive_timeoutbounds only the wait for the next request line, so headers and a slow body keep the fullread_timeout; an idle connection closes quietly after it instead of answering408, while a request that stalls after its request line does get408.HEADis dispatched to the matchingGETroute and answers with the same headers —Content-Lengthincluded — and no body, so a kept-alive client is never left with stray bytes. A client that closes between requests is no longer reported as a bad request. (#210)
Bug Fixes¶
-
httpclient: a streamed body that ends before its declared
Content-Lengthnow raisesHttpConnectionErrorinstead of returning the short body as if it were complete.iter_bytes(),iter_lines(),read()and their async equivalents track the bytes received for a fixed-length response and fail when the peer closes early, andbody_completeis not reported for a truncated body. Responses that never carry a body —HEADrequests and204/304statuses — are exempt. (#236) -
toon (v0.6.1):
encode()anddecode()now reject unknown option keys withTypeError, so a porting typo such as the reference'sindent_sizeno longer silently emits a different document.decode()accepts UTF-8 encodedbytes/bytearrayand raisesToonDecodeErrorfor invalid UTF-8, and theToonDecodeErrordocstring now states the non-ValueErrorcontract. - jsonx (v1.0.2):
loads_lines()now opts out of its batch fast-path when a custom decoder or hook is supplied, matchingloads(): callbacks run once per value instead of being invoked speculatively up to three times, and a hook'sJSONDecodeErrorrejection is not retried.loads()rejectsbyteswith an explicitTypeErrornaming the limitation instead of leaking the regex scanner's internal error. - toon (v0.6.0): the list form now round-trips a nested object value.
[{'d': {}}]encodes as- d:and decodes back instead of droppingd, and an array of objects with differently-keyed sub-objects decodes its own encoder output instead of raising. The encoder now writes the item header and its first key on one line, matching the reference. (#188) - jsonx (v1.0.1):
loads()triesjson.loadson the raw text first and runs the comment/trailing-comma scanner only when that fails, since JSON is a subset of JSONC. On comment-free documents this removes two full regex passes that cost about 14× the parse itself (129 KiB document: 65.6 ms → 4.05 ms); a genuinely JSONC document pays one extra failed parse. Hooks and custom decoders opt out of the fast path, so they are never invoked on a speculative parse; when preprocessing leaves the text unchanged there is nothing to retry, so a failure is reported once — a hook that raisesJSONDecodeErrorto reject a document is not asked again and its refusal is not overridden. (#206, #208) - toon:
decode()raisesToonDecodeErrorfor an invalid escape sequence and for a trailing backslash instead of a bareValueError, matching the documented contract and the conformance gate'sshouldErrorexpectation. Nine fixture IDs move from failing to passing (350 → 359 of 564).ToonDecodeErroris not aValueErrorsubclass, so a caller'sexcept ValueErrorarounddecode()no longer catches malformed input — that is the intended contract, anddocs/modules/toon.mdnow says so. The rest of the gap against the spec is input the decoder silently accepts, not error typing; it stays recorded in the conformance baseline and is tracked by #184. (#198, #209) - httpserver: a connection that was accepted but never sent a request no longer holds a shutdown for
shutdown_grace_timeout. Waiting for a request line is idle whether it is the first one or the next on a reused connection, so a TCP health probe or load-balancer check is closed immediately instead of being drained as if a request were in flight. The boundary is the end of the wait for that line: as soon as a request line arrives the connection stops being idle, so a body that is still uploading is drained and answered rather than cut off mid-transfer. (#220) - httpserver: a shutdown now waits for requests that are already being handled on 3.10/3.11 too.
Server.wait_closed()returns immediately there, so_serveused to exit andasyncio.runcancelled the connection handler mid-response; handlers are tracked and drained for up toshutdown_grace_timeout(default 5 s) before cancellation, and a response produced after shutdown began carriesConnection: close.App.shutdown()is also a no-op once the loop has closed instead of raisingEvent loop is closed. (#216) - httpserver: a graceful shutdown no longer waits out
keep_alive_timeoutfor idle clients. Since Python 3.12Server.wait_closed()waits for every open connection, and an idle kept-alive connection stays open until the idle window expires — 5 s by default, longer if configured. Connections waiting for their next request line are now closed when shutdown starts; in-flight requests still finish. (#215) - httpclient: a socket timeout now raises
HttpTimeoutErrorinstead ofHttpConnectionError— the module's backwards-compatibleTimeoutError = HttpTimeoutErroralias shadowed the builtin, so the genericOSErrorbranch won. Timeouts are also never retried, since a retry doubles the caller's wall-clock budget and can reach the server twice; a reused connection takes the current call's timeout; a request that fails mid-body closes its connection instead of returning a half-consumed one to the pool; and an HTTP/1.0 response is pooled only when it sendsConnection: keep-alive(RFC 7230 §6.3). The async default pool now lives on its event loop, so a finished loop's pool is collected instead of leaking one socket perasyncio.run(), and a forked child drops inherited sockets. (#212, #213) - soup (v0.7.1): a comma inside a quoted attribute value was skipped outright, so a selector list such as
[title="a,b"], [title="c"]parsed as a descendant selector and returned nothing — discarding the groups that parsed correctly. The list is now split on top-level commas only, tracking quoted strings, brackets and parentheses, and the groups are unioned in document order. An empty group (a trailing or doubled comma) raises instead of widening to every element, and an unsupported pseudo-element raises instead of silently dropping its group. (#196) - soup (v0.8.0): attribute selectors now compare values in the HTML Standard's legacy attribute set (
type,lang,dir,rel,methodand 41 more) ASCII case-insensitively for=,~=,|=,^=,$=and*=. The other 45 names previously under-matched a case-differing selector. This diverges from soupsieve 2.10 on purpose — it foldstypeonly — so[lang="en"]now matcheslang="EN", as it does in every browser. (#194) - soup (v0.8.1):
[attr|=""]now matches a value that begins with-as well as an exactly-empty one. Selectors Level 4 §6.1 defines|=with no empty-string exclusion — unlike~=in the same section and^=,$=,*=in §6.2, which each have one — so the previous behaviour under-matched. (#201) - toon (v0.5.0): empty arrays now encode as
key: []and never as the legacykey[0]:form, per spec §9.1, and an empty-string key no longer disappears when its value is an empty array. (#195)
Infrastructure¶
- benchmark modules skip without
pytest-benchmark: forty of the forty-onetest_*_benchmark.pymodules took thebenchmarkfixture without guarding on the plugin, so a checkout without the benchmark extra reported every case asfixture 'benchmark' not foundinstead of skipping. Each now callspytest.importorskip("pytest_benchmark"). - benchmarks: the benchmark workflow now installs the TOON reference from the
bench-toongit pin instead of an unpinnedgit+install with|| true, and asserts thattoon/rows are present in the artifact. A failed reference install now fails the job instead of silently dropping the comparison, matching the guards3already had. - benchmark extras use Pillow 13 on Python 3.11+: all 39 open Dependabot advisories against
bench-qr/bench-png(4 critical, 23 high, 12 medium) are fixed in Pillow 13.0.0. That release requires Python 3.11, so the pin is split — 13.0.0 from 3.11, 12.3.0 (the last release supporting it) on 3.10. Only the benchmark reference extras are affected; nothing in the modules themselves depends on Pillow. - the suite collects under
python -m pytestagain:import qrcodeimportspng, and with the repository root onsys.path— whichpython -mputs there, thepytestconsole script does not — that boundpng/as an empty namespace package and cached it, so the png tests' own import failed and collection aborted the run. The png test modules drop any cachedpngthat is not this directory's own module before importing it — a namespace entry, or the realpypngmodule thatqrcodebinds when it is installed. Full collection is 8805 tests, no errors. (#223) - dotenv and frontmatter benchmarks now measure the real reference: both test directories are named like the packages they compare against, and pytest's prepend import mode put them ahead of site-packages, so
pytest.importorskipbound the repo's own module and the publishedtest_python_dotenv/test_python_frontmattercolumns were the zerodep implementation on both sides. Each benchmark now hides the shadowing entries while importing the reference, restores them afterwards, and raises if the bound module lives inside the repository, so the collision fails loudly instead of producing plausible numbers. (#205) - tabulate correctness tests are environment-independent again: the reference switches from
len(s)towcwidthfor column widths when that package is installed, while zerodep's default islen(s). Wherewcwidtharrives as a transitive dependency, four unicode/CJK comparisons were measuring two different width rules and failed. The test hideswcwidthfor the reference import and asserts it stayed hidden.WIDE_CHARS_MODEnow counts zero-width marks (nonspacing, spacing combining, enclosing and format characters) and Hangul medial/final jamo as zero —caféis four columns and हिन्दी three — matchingwcwidth's per-character widths; clusters (emoji presentation sequences, Indic conjuncts) are counted per component and documented as where the two diverge. New tests compare each shape to the per-characterwcwidthsum, and theWIDE_CHARS_MODE=Truetable output to the wcwidth-backed reference. (#228) - soup correctness tests use soupsieve only where it is the reference: the suite compares zerodep's results with soupsieve, but two groups encode behaviour soupsieve gained in 2.10 — the Selectors-4 empty-value guards on
^=,$=,*=(#201) and whitespace around selector-list commas (#204). With an older soupsieve (2.8.x is common in pinned environments) those 8 comparisons failed on the reference side even though zerodep follows the spec. The direct assertions still run everywhere; the reference comparisons are skipped below 2.10. - CI runs the test suite for pull requests into any base branch, not only
master, so a stacked PR no longer needs a manualworkflow_dispatchto get checks. (#190) - toon spec conformance gate: the official TOON spec 4.4 fixtures (564 cases — 160 encode, 404 decode) are vendored under
toon/fixtures/, pinned totoon-format/specv4.4.0, and gated in CI by a ratchet baseline that can only shrink. Current standing: 350/564. Stage 1 of #184. (#195) - s3 benchmarks now run against a SeaweedFS container instead of MinIO (abandoned upstream). CI provides the endpoint via a GitHub Actions service container and the
S3_TEST_ENDPOINTconvention, so the s3 benchmark comparison is finally published on every run.
[2026.9.28] - 2026-09-28¶
New Modules¶
- aiosqlite (v0.1.0): Async wrapper for Python's built-in
sqlite3— dedicated worker thread per connection, fullsqlite3.Connection/sqlite3.CursorAPI mirror, convenience shortcuts (execute_fetchall,execute_fetchone,execute_insert). (#180)
Bug Fixes¶
- httpclient: Close
StreamReaderinStreamingResponse.aclose()and release reader/writer references to prevent CLOSE_WAIT socket leak. Callsfeed_eof()to unblock pending reads before cleanup. (#178) - httpserver: Detect client disconnect during streaming responses to prevent CLOSE_WAIT leak. Adds periodic
is_closing()checks viaasyncio.shield()+wait_for()when the generator is blocked on slow upstream I/O. Configurable viaStreamingResponse(disconnect_check_interval=...). (#179) - jsonschema: Preserve genuine multi-branch
anyOf/oneOfunions instead of collapsing them to the first non-null branch. Previouslyfloat | list[float] | Nonesilently discarded all branches but the first. Now unions with 2+ non-null branches keep the remaining branches under their original keyword (anyOforoneOf), with the null branch stripped andnullable: trueset. (#173)
Documentation¶
- Register
s3module in docs index config. (#174)
Infrastructure¶
- Add measurement scripts under
_scripts/experiments/: supply-chain attack surface, import memory, cold-start latency, and install footprint. (abc8d78, 77cecc0, 499b8c5)
[2026.9.15] - 2026-09-15¶
New Modules¶
- profiler (v0.1.0): cProfile wrapper module with text and HTML report output (table, flamegraph, icicle chart styles). Sync + async context managers for easy profiling. (#161, #166)
Features¶
- profiler: Add
TracingProfiler— per-call tracing profiler with thread-aware collection usingsys.monitoring(PEP 669, Python 3.12+) withsys.settracefallback. Same output interface asProfilerplus raw trace access viatraces(). (#168, #169) - profiler: Add flamegraph and icicle chart visualization styles with interactive zoom, search, tooltips, and collapsible stacks. (#166)
- ratelimit: Add
CompositeLimiterfor multi-window rate limit enforcement (e.g., RPM + RPD). (#159) - ratelimit: Add
CompositeLimiterintrospection API —detail(),__iter__,__repr__on all limiter classes. (#163, #164) - httpserver: Add TLS support (
ssl_certfile/ssl_keyfile) and socket tuning parameters (backlog,reuse_port). (#165) - httpserver: Add request lifecycle signals —
on_request_start,on_request_end,on_errorhooks. (5356aa4) - jsonschema: Add JSON Schema data validation —
schema_validate()anditer_errors()for validating data instances against JSON Schema documents (Draft 2020-12 subset for OpenAPI 3.x). Supports type, enum, const, string/number constraints, object keywords, array keywords, composition (allOf/anyOf/oneOf/not), if/then/else, and boolean schemas. 60-180x faster thanjsonschemaPyPI. Module tier upgraded frommediumtosubsystem. (#131, #157) - jsonschema: Add
resolved=Trueflag toiter_errors()/schema_validate()for resolve-once-validate-many pattern — skip redundant$refresolution when the caller has already calledresolve_refs(). ~3.4x faster for repeated validation against the same schema. Note:resolved=Falseremains the safe default; passingresolved=Trueon an unresolved schema silently skips$reftargets. (#157)
Bug Fixes¶
- httpserver: Guard
_dispatchagainstBrokenPipeErrorescalation. (c0229d1)
Infrastructure¶
- Add cold-start benchmark for import + first-call overhead. (#160)
[2026.9.12] - 2026-09-12¶
Bug Fixes¶
- jsonschema: Position-aware walkers preserve user parameter names that collide with schema keywords (e.g.
title,deprecated,examples). Previously these were silently stripped frompropertiesmaps. Also addsdependentSchemasto the property-map key set. (#153, #154)
Infrastructure¶
- CI: Inline PyPI publish into
release.ymlas a direct job instead of unreliablegh workflow rundispatch viaGITHUB_TOKEN. (#152, #155)
[2026.9.9] - 2026-09-09¶
Features¶
- CLI: Add
outdated --jsonflag for machine-readable JSON output with module list andoutdated_count. (#149) - CLI: Add
outdated --exit-codeflag — exit 1 when outdated or renamed modules found, followinggit diff --exit-codeconvention. (#149) - CLI: Add
update --allflag to discover and update all outdated modules without listing them explicitly. (#149) - CLI: Add
[tool.zerodep]config support inpyproject.toml—vendor-dirkey allows omitting-dflag in projects that declare their vendor directory. Uses a lightweight regex parser (notomllibdependency, works on Python 3.10+). (#149) - httpclient: Add cookie support —
Response.cookies/StreamingResponse.cookiesproperty,cookies=kwarg on all request functions, session cookie jar onClient/AsyncClient. (#150) - httpserver: Add cookie support —
Request.cookiesproperty (lazy-parsed),Response.set_cookie()/delete_cookie()methods on all response types. (#150)
Bug Fixes¶
- httpclient: Fix multi-
Set-Cookieheader loss whereCaseInsensitiveDictkept only the last value. (#150)
Infrastructure¶
- CLI: Extract
_scan_outdated()helper shared bycmd_outdatedandcmd_update --all. - CLI: Add
test_cli.pywith 11 tests covering--jsonoutput structure,--exit-codebehavior,update --all, andpyproject.tomlconfig reading. - docs: Add CI automation section to zerodep skill file documenting the workflow pattern and new CLI flags.
[2026.9.7] - 2026-09-07¶
Bug Fixes¶
- validate: Propagate coerced values in struct field validation — previously coerced values (e.g. string-to-int) were discarded during
create_structfield processing. (#148) - validate: Propagate coerced values in all collection validators (list, set, frozenset, tuple, dict) — coercion results were being dropped in nested collection validation paths. (#148)
[2026.9.6] - 2026-09-06¶
Features¶
- validate: Add
Docannotation marker for per-field descriptions in JSON Schema. Works withAnnotated[str, Doc("...")]on both static TypedDict/dataclass fields and dynamically created types. (#142, #143) - validate: Add
create_struct(name, fields)for dynamic TypedDict construction at runtime. Fields specified as(type, default)tuples where...means required. Returns a real TypedDict compatible withvalidate(),json_schema(), andmodel_validator(). (#142, #143) - validate:
json_schema()now emits"default"per property forcreate_structtypes and dataclass static defaults. (#142, #143)
Bug Fixes¶
- validate: Support PEP 604 unions (
X | Ysyntax) in bothvalidate()andjson_schema(). Previouslytypes.UnionTypewas not recognized, causing PEP 604 unions to silently pass validation and produce empty schemas. Also fix duplicate null in schema whenOptional[X | None]is double-wrapped byget_type_hints(). (#143) - validate: Detect
Required/NotRequiredfrom annotation on Python 3.10 wheretyping.TypedDictdoesn't populate__required_keys__/__optional_keys__correctly for these wrappers. (#141) - httpclient: Use byte-buffer in
iter_lines()/aiter_lines()to prevent UTF-8 corruption when multi-byte characters are split across chunk boundaries. (#140) - httpclient: Fix
iter_lines()bypassing gzip decompression.
Performance¶
- retry: Optimize decorator overhead -60% (430→170 ns) and retry-with-failures -30% (3,374→2,348 ns). Fast-path for success case bypasses
_retry_syncloop. Module-level caching ofrandom.random. (#144)
[2026.9.4] - 2026-09-04¶
Features¶
- httpserver: Add optional
backgroundcallback toStreamingResponse— a sync or async callable invoked after the stream generator completes (including on client disconnect). Follows the StarletteBackgroundTaskpattern. Callback exceptions are logged at warning level and suppressed. (#132, #133) - httpserver: Add
on_startupandon_shutdowndecorator hooks for server lifecycle management. Startup hooks run in registration order before accepting connections; shutdown hooks run in reverse order (LIFO) after server stops. Both sync and async callables supported. Shutdown hooks are guaranteed to run even on partial startup failure. (#134, #137) - httpserver: Add
Stateclass andrequest.stateattribute for per-request data sharing between middleware and handlers. Follows the Starlette pattern with__dict__-based attribute access. (#135, #138)
Bug Fixes¶
- httpserver:
shutdown()is now thread-safe — usesloop.call_soon_threadsafe()instead of directly callingasyncio.Event.set(), which was silently failing when called from a different thread. - httpserver: Generator
aclose()failure inStreamingResponseno longer prevents the background callback from running.
[2026.8.30] - 2026-08-30¶
Bug Fixes¶
- httpclient:
_aiter_chunkedno longer crashes with a bareValueErrorwhen the chunk-size line is not valid hex (e.g. when an upstream reverse proxy injects a raw HTTP error into an active chunked stream). Now raisesHttpConnectionErrorwith the raw line content (truncated to 100 bytes). (#129, #130)
Infrastructure¶
- benchmarks: auto-discover reference libraries from
pyproject.tomlextras instead of hardcoded lists. Fix ratelimit benchmark skipping entire suite when limiter is absent.
[2026.8.25] - 2026-08-25¶
New Modules¶
- ratelimit (v0.1.0): zero-dependency multi-algorithm rate limiter with 4 algorithms (Token Bucket, Fixed Window, Sliding Window Counter, GCRA) behind a common
RateLimiterprotocol. Convenience API:ratelimit()decorator/context manager (sync + async),create_limiter()factory,parse_quota()string parser ("10/s","100/m burst 200"),ThreadSafeLimiterwith per-key locking,RateLimitExceededexception, wait-and-retry with timeout. Full async API (aacquire/apeek) on all limiter classes. 2-4x faster thanlimitslibrary, within 1.05x oftoken-bucketC-extension on FixedWindow. (#120, #121)
Bug Fixes¶
- sibling imports:
_ensure_sibling_path()now supports both flat (_vendor/soup.py) and nested (soup/soup.py) vendor layouts. Previously only the nested layout worked, causing silent import failures in flat-vendored projects. Restoredos.path.abspath(__file__)for robustness. Affects 9 modules: readability, qr, vcs, skills, sse, config, a2a, acp, cdp. (#124, #125) - CLI:
bumpsubcommand now usesprimary_fileinstead offiles[0].outdatedsubcommand gains-d/--dirflag. Benchmark files (benchmark_*.py) excluded from module file lists.
Performance¶
- ratelimit: +75% single-thread throughput via
__slots__result class, inlined hot paths, per-key threading locks, and eliminatedint()/round()overhead. TokenBucket: 1338→762 ns/op. Multi-thread different-key: +76%. (#126)
[2026.7.20] - 2026-07-20¶
Bug Fixes¶
- httpclient: close async writer in sync
close()to prevent file descriptor leaks on long-lived connections.
Infrastructure¶
- release: regenerate
manifest.jsonin release workflow to ensure it stays in sync.
[2026.7.16] - 2026-07-16¶
New Modules¶
- s3 (v0.2.0): stdlib-only S3-compatible client. Phase 1: SigV4 signing,
get_object,put_object,head_object,delete_object,list_objects_v2. Phase 2:create_bucket,delete_bucket,head_bucket,list_buckets,copy_object. Benchmarked against boto3 and minio on MinIO Docker.
Enhancements¶
- validate: accept dataclass instances as input to
validate(). Instances are automatically converted to dicts viadataclasses.fields()at each nesting level, enabling recursive validation of nested dataclass trees. Cross-type validation (dataclass instance against TypedDict schema) also works. Previously, passing a dataclass instance would raiseValidationError: Expected dict, got <ClassName>. - httpclient: add
CaseInsensitiveDictfor headers; use throughout the header pipeline. Fixes case-insensitive header deduplication. (#116) - httpclient: align sync/async client behavior and interface parity.
AsyncClient.close()no longer warns on no-op calls.
Infrastructure¶
- Add
zerodepCLI skill for Claude Code and Hermes Agent.
[2026.6.29] - 2026-07-02¶
Enhancements¶
- httpserver: add Unix domain socket support. Return HTTP error responses instead of silent disconnects. Extract
_send_error_and_closehelper to reduce repetition.
Bug Fixes¶
- httpserver: fix stale socket test for Python 3.13 compatibility (use
socket.bind()instead ofsocket.connect()). - sse: replace private slot writes with keyword args in
_SSEParser, fixing initialization issues. Bump to 0.3.2.
Performance¶
- validate: O(1) discriminated union dispatch —
_try_discriminatednow uses a cached{literal_value: TypedDict}dispatch table instead of O(variants) linear scan per call. ~230x faster on large unions (e.g. 500 items × 10-variant union: 917ms → 4ms in production profiling). (#107, #108)
Infrastructure¶
- Pin dev tool versions in CI workflows: ruff 0.15.20, ty 0.0.54, complexipy 5.6.1.
[2026.6.13] - 2026-06-13¶
New Modules¶
- jsonx (v1.0.0): renamed from
jsonc, now an extended JSON parser supporting JSONC (comments + trailing commas) and JSONL/NDJSON. New API:loads_lines,load_lines,dumps_lines,dump_lines. Batch fast-path matchesndjsonspeed on clean JSONL. (#95, #99)
New Features¶
- readability: Expose best-candidate
scoreinReadabilityResult(#97). Newscore: floatfield (default0.0) carries the readability score of the best candidate container selected by the scoring algorithm. Higher values indicate stronger confidence that the extracted content is a real article rather than navigation/boilerplate. Zero when no scored candidate was found (body fallback). Enables downstream consumers to make smarter content quality decisions (e.g. SPA shell detection).
Enhancements¶
- config: updated internal dependency from
jsonctojsonxwith backward-compatible fallback to legacyjsoncmodule. - CLI: added
replaced_bymechanism —zerodep add jsoncnow installsjsonxwith a migration notice;zerodep outdateddetects localjsonc.pyand suggests upgrading.
Performance¶
- jsonx:
loads_linesuses batch parsing (join lines into JSON array, singlejson.loadscall) for clean JSONL, achieving ndjson-level performance. Falls back to per-line JSONC processing when comments are present.
[2026.6.1] - 2026-06-01¶
Bug Fixes¶
- httpclient:
_prepare_body(data={"key": "value"})no longer silently drops dict data whenfilesis not provided. Dict data is now URL-encoded asapplication/x-www-form-urlencoded, matchinghttpx/requestsbehavior. (#93)
Testing¶
- Added concurrency benchmarks for httpclient, websocket, and cache modules.
- Added geometric scale curves for yaml/soup/protobuf/multipart benchmarks. (#86)
- Added tracemalloc memory benchmarks for parser modules. (#84, #85)
- Added min/max/stddev/P95 metrics to benchmark reports. (#81)
- Added real-world fixture data for parser module benchmarks. (#83)
Infrastructure¶
- Refactored CI into a reusable
lint-test.ymlworkflow called by bothci.ymlandrelease.yml. - Switched lint job to
pre-commit run --all-filesinstead of raw ruff commands. - Unified CI/release reference library installation via
pyproject.tomlextras. - Used official complexipy pre-commit hook.
- Added
CONTRIBUTING.mdand no-AI-co-author policy to workflow docs. - Added arXiv badge and citation BibTeX.
[2026.5.17] - 2026-05-17¶
New Modules¶
- multipart module: zero-dependency multipart/form-data parser and encoder per RFC 7578 / RFC 2046.
parse_multipart()parses request bodies using a boundary-split algorithm withbytes.find()for C-level performance.encode_multipart()encodes form fields and file uploads.extract_boundary()extracts boundary from Content-Type headers.Partfrozen dataclass with name, data, filename, content_type, headers,.textand.is_fileproperties. Robust boundary detection (validates preceding/following bytes to avoid false matches). Content-Transfer-Encoding support (base64, quoted-printable). RFC 5987filename*parameter decoding. Security limits: max_part_size (10 MB), max_parts (1000), max_header_size (16 KB). Single file, ~590 lines, stdlib only. 57 correctness tests + 11 benchmarks (3-7x faster than python-multipart).
Bug Fixes¶
- httpclient: Remove redundant global
asyncio.Lock()/threading.Lock()fromAsyncClient/Clientthat serialized concurrent requests and could cause deadlocks. Connection pools already provide internal fine-grained locking.
Infrastructure¶
- Added docs/changelog update workflow guidance to AGENTS.md.
[2026.5.2.1] - 2026-05-02¶
Bug Fixes¶
- CLI:
version-checkandbumpno longer incorrectly auto-bump brand-new modules that have no prior release tag. New modules now display"new (initial release)"instead of"new (needs version bump)"and are excluded from auto-bump targets. - Module versions: Reverted incorrect version bump on 5 new modules — httpserver (0.1.0), websocket (0.1.0), cdp (0.1.0), useragent (0.1.0), synctex (0.2.0).
[2026.5.2] - 2026-05-02¶
New Modules¶
- websocket module: zero-dependency RFC 6455 WebSocket client with sync + async support.
WebSocketClientandAsyncWebSocketClientforws://andwss://connections. Full protocol implementation: upgrade handshake, text frame encoding/decoding with client-side masking, ping/pong auto-response, close frame exchange with status codes. Custom headers for auth tokens, subprotocol negotiation, configurable timeouts. Context manager support (with/async with). TLS with optional certificate verification. Single file, ~1000 lines, stdlib only (socket,ssl,asyncio,hashlib,struct). 27 correctness tests (sync + async, echo, timeout, custom server, URL parsing) + 8 benchmarks (vswebsockets— JSON-RPC roundtrip, large payload, burst messages, connection setup). - cdp module: zero-dependency Chrome DevTools Protocol client for headless browser automation.
CDPClientandAsyncCDPClientcommunicating over WebSocket with command/response ID matching and event buffering. High-level API:get_rendered_text()andget_rendered_html()for one-call SPA content extraction. Low-level API:create_target(),close_target(),navigate()(withPage.loadEventFiredwaiting),evaluate()(with exception propagation),set_user_agent(), and rawsend_command(). Auto-discovers browser debugger WebSocket URL via/json/version. Depends on siblingwebsocketmodule. ~900 lines, stdlib only. 18 correctness tests (mock CDP server + optional real Chromium) + 10 benchmarks (full render pipeline, multi-target, JS eval throughput, command throughput). - httpserver module: zero-dependency async HTTP server with Flask/microdot-compatible decorator-based routing. Built on
asyncio.start_server()with raw HTTP/1.1 parsing.@app.route(path, methods=),@app.get(),@app.post()etc. for route registration. Path parameters with type conversion (<name>,<int:id>,<float:price>,<path:filepath>). Return value coercion (dict → JSON, str → text, bytes → binary, tuple → status/headers, None → 204).StreamingResponsewith chunked encoding for SSE.FileResponsefor static file serving with directory traversal prevention.before_request/after_request/errorhandlermiddleware hooks. Sync handlers auto-wrapped viaasyncio.to_thread(). Graceful shutdown with SIGINT/SIGTERM handling. Single file, ~1000 lines, stdlib only. 58 correctness tests + 26 benchmarks (vs Flask, microdot, bottle — serial, concurrent, sync/async, large payload). - SyncTeX module: zero-dependency SyncTeX parser for bidirectional search between PDF and source. Parses
.synctexand.synctex.gzfiles produced by TeX engines.parse_synctex()extracts input file mappings, page hbox records, and preamble metadata.inverse_search()maps PDF page coordinates back to source file and line number using a multi-phase spatial matching algorithm.forward_search()maps source file and line number to PDF page coordinates. Supports configurable path prefix stripping for Docker/remote builds. 29 correctness tests. - useragent module: lightweight Chrome/Edge User-Agent string generator with Client Hints headers.
generate()creates realistic UA strings with matchingSec-CH-UA-*headers for Windows, macOS, Linux (desktop) and Android (mobile). Supports low-entropy hints (always included) and high-entropy hints viaaccept_ch()(platform version, architecture, bitness, model, full version list). Deterministic output viarandom.seed(). Single file, ~470 lines, stdlibrandomonly. 47 correctness tests + 8 benchmarks (2-3x faster than ua-generator). Inspired by ua-generator (Apache-2.0).
Infrastructure¶
- Added
websocketsto benchmark CI workflow for websocket and cdp performance tracking. - Added
ua-generatorto benchmark CI workflow for useragent performance tracking. - Added automated PyPI publish workflow (
.github/workflows/pypi.yml) triggered on GitHub Release, with change detection to skip version-only bumps. - Added
AGENTS.md(unified AI coding assistant instructions) withCLAUDE.mdsymlink for cross-tool compatibility (Claude Code, Codex, Cursor, Copilot, Gemini CLI).
Enhancements¶
- CLI: added
--from FILEflag tozerodep newfor creating modules from existing Python source files. Automatically injects frontmatter if missing (respects shebang/encoding lines), preserves existing frontmatter with CLI override support, and warns on third-party imports.
[2026.4.27] - 2026-04-27¶
New Modules¶
- llms.txt module: zero-dependency parser for the llms.txt specification.
parse()extracts structured data (title, description, details, H2 sections, Optional entries) from llms.txt files.find_candidates()provides unified URL discovery — searches parsed llms.txt entries (exact > extension variation > path prefix) with heuristic.mdURL fallback when no llms.txt is available.discover()probes any URL's root for/llms.txtand/llms-full.txt, returning raw content viaDiscoveryResult. Frozen dataclasses (LlmsTxt,FileEntry,DiscoveryResult) for immutable results. 55 correctness tests + 4 benchmarks. - PNG module: zero-dependency PNG/BMP image codec with matrix compression API.
decode_png/encode_pngfor PNG images (grayscale/RGB/RGBA, 8/16-bit, all 5 row filters),decode_bmp/encode_bmpfor BMP (24/32-bit uncompressed),convert()for mode conversion between L/LA/RGB/RGBA, andmatrix_to_png/png_to_matrixfor 2D numeric data compression via PNG row filters with lossless float round-trip through tEXt metadata. 104 correctness tests (apple-to-apple vs Pillow) + 24 benchmark tests.
New Features¶
- Protobuf module: added
byte_size()method for computing serialized message size without materializing bytes. Useful for pre-allocating buffers and protocol frame length calculation. - QR module: added
qr_to_svg()andqr_to_png()for rendering QR codes as SVG and PNG images. SVG uses a single<path>element (zero deps); PNG renders grayscale via siblingpngmodule (lazy import). Both support configurable scale, quiet zone border, and foreground/background colors. 24 render tests. - Validate module: added
FieldValidatorandmodel_validatorfor custom validation logic.FieldValidatoris anAnnotated-based constraint that can transform values and raiseValueError/AssertionErroron failure (unlikePredicatewhich only returns bool).model_validatoris a decorator to register cross-field validators on TypedDict/dataclass types, run after all field validation passes. 18 new tests. Version 0.4.2 → 0.5.0. - Sparse Search module: added post-retrieval re-ranking utilities for hybrid search and RAG pipelines.
rrf()implements Reciprocal Rank Fusion (Cormack et al., SIGIR 2009) for merging multiple ranked result lists (e.g. BM25 sparse + dense vector search) with per-list weights and top_k truncation.mmr()implements Maximal Marginal Relevance for result diversification with user-provided similarity function and internal min-max score normalization.jaccard_similarity()provides a set-based similarity building block for MMR. All three are standalone functions operating on genericlist[Result]. 31 new correctness tests + 5 benchmarks. Version 0.3.2 → 0.4.0.
Enhancements¶
- Markdown module: added GFM strikethrough (
~~text~~→<del>), task lists (- [ ]/- [x]with checkbox and class attributes), and extended autolinks (barehttps:///http://URLs auto-linked with trailing punctuation stripping). All outputs match mistune with GFM plugins. 28 new correctness tests + 4 GFM benchmarks. Version 0.3.1 → 0.4.0. - Soup module: added CSS pseudo-selector support —
:first-child,:last-child,:only-child, and:not(selector). Covers the most commonly needed structural pseudo-classes.:not()accepts any simple selector (tag, class, ID, attribute, or nested pseudo). Added CSS select and pseudo-select benchmarks. Version 0.5.0 → 0.6.0.
Performance¶
- PNG module: optimized BMP codec, PNG row filters, and mode conversion. BMP decode/encode replaced per-pixel BGR↔RGB loops with
bytearrayslice assignment (C-level ops) — 42-44x speedup (from 193-265x slower to ~4.6-6.1x slower vs Pillow). PNG row filters optimized: list comprehension +zipfor Up filter, prefix handling for Sub filter, local variable caching for Paeth. Pre-allocated pixel buffers in decode/encode paths. 7 lossless mode conversions (L↔RGB↔RGBA etc.) converted from per-pixel loops to slice operations. PNG decode/encode ~10% faster overall. - Protobuf module: comprehensive encode/decode optimization — encoder dispatch binding on FieldInfo (eliminates 11-way if/elif), per-field specialized
_is_defaultchecks, inline 1-byte tag decode fast-path (field numbers 1-15), write-to-buffer varint/scalar encoders (eliminates intermediatebytesallocation), cached map entry type metadata (_MapMeta), batch message construction via__dict__.update. Encode ~41-65% faster, decode ~7-27% faster, roundtrip ~39% faster for large messages.
Infrastructure¶
- Refined module categories from 7 to 12 fine-grained groups: network, protocol, serialization, validation, text, config, terminal, crypto, image, process, storage, devtools.
- Renamed
scripts/→_scripts/(internal convention). - Auto-generate
modules/index.mdduring docs build frommanifest.json+ config. - Fixed
version-checkfalse positives caused by old project-level SemVer tag collisions and wrong primary file selection.
[2026.4.25] - 2026-04-25¶
New Modules¶
- JSON Schema module: zero-dependency JSON Schema flattening & sanitization.
flatten_schema()resolves$ref, mergesallOf(deep-merge with type intersection, numeric constraint tightening, required union), simplifiesanyOf/oneOf(nullable detection, single-variant unwrap), and strips unsupported keywords. Each phase is independently callable:resolve_refs,merge_allof,simplify_unions,sanitize. Benchmarked againstallof-merge(JS) across 5 complexity tiers — 1.7-5.3x faster. 57 unit tests + 13 cross-implementation correctness tests. - Readability module: zero-dependency article content extractor ported from Mozilla Readability.js.
extract()performs full article extraction with metadata (title, author, excerpt, published_time, site_name, lang, dir).is_probably_readable()provides a quick readability heuristic check. Supports JSON-LD and OpenGraph metadata extraction. 2-level retry (ruthless on/off) for robust extraction. 18 Mozilla Readability.js test fixtures for cross-validation. Three-way benchmark: zerodep vs readability-lxml vs Mozilla JS. Depends onsoupmodule (no pip dependencies).
Enhancements¶
- Soup module: extended with tree mutation and serialization APIs —
append(),insert(),extract(),replace_with(),unwrap()for tree manipulation;to_html()/__str__()for HTML serialization;__setitem__/__delitem__for attribute setting/deletion;Soup.new_tag()factory method for creating detached Tag nodes.
Performance¶
- A2A module: optimized serialization and deserialization paths —
to_dict()now avoidsdataclasses.asdict()-style deep copy overhead. Serialization is now 2.2-2.6x faster than a2a-protocol (previously 1.4-2.1x slower). Deserialization narrowed from 1.8-4.1x slower to 1.1-1.7x slower via optimized enum resolution and type dispatch. JSON round-trip is now 1.4-1.5x faster end-to-end. - Cache module: optimized
TypedKeyconstruction, decorator wrapper path, and LFU eviction. LRU decorator overhead is now 1.2x faster than cachetools. TTL decorator reached parity. LFU eviction now ~equal (previously 1.4x slower). - PersistDict module: optimized SQLite write performance —
PRAGMA synchronous=NORMAL,commit_everyparameter for batched writes, deferred commits. - QR module: optimized encoding path — short inputs now only 1.1x slower (previously 2.1x). Medium/long inputs now 1.1-1.2x faster (previously 1.7-1.9x slower).
- Readability module: optimized scoring and tree-walking — small pages 2.1x faster, medium pages now 1.2x faster (previously 2x slower). Large pages improved from 2x slower to 1.4x slower vs readability-lxml.
- Semver module: optimized parse, comparison, and property access. Parse ~1.3x faster, sort ~1.4x faster, compare ~1.4x faster, property access ~4.5x faster.
Bug Fixes¶
- Docs: fixed ReadTheDocs build failure caused by
search→sparse_searchmodule rename.
[2026.4.15] - 2026-04-15¶
New Commands¶
zerodep bump: auto-detect changed modules (via content hash comparison against git tags) and bump their frontmatter version. Supports--patch(default),--minor, and--majorlevels. Optionally accepts specific module names. Regeneratesmanifest.jsonafter bumping.zerodep new: scaffold a new module directory with template files — module source (with frontmatter, copyright, and__all__), correctness test file. Accepts--category,--tier, and--depsoptions.
Enhancements¶
zerodep version-check --strict: new flag that exits with code 1 when any module needs a version bump, enabling CI integration.
CI¶
- Release workflow: new GitHub Actions workflow (
.github/workflows/release.yml) that automates the full release process — lint, test, auto-detect CalVer version, bump module versions, update project version, commit, tag, and create GitHub Release. Triggered viaworkflow_dispatchwith optional manual version override. - Benchmark version-check: added non-blocking
version-checkstep to benchmark workflow as a reminder for unbumped modules. - Raised benchmark alert threshold from 150% to 200% to reduce false positives from CI runner variance.
Bug Fixes¶
- a2a module: fixed
StrEnumstring representation test for Python 3.11+ (use.valueattribute instead of f-string formatting). - httpclient module: switched benchmark tests from
httpbin.orgto local test server for reliability.
Refactoring¶
- Complexity reduction: refactored 19 modules to bring all functions under cognitive complexity 20 (complexipy) and cyclomatic complexity 20 (ruff C901). Modules refactored: cache, validate, tabulate, dotenv, runner, xml, diff, soup, sse, search, scheduler, depdetect, qr, acp, yaml, toon, protobuf, markdown, httpclient.
- Refactoring patterns used: per-type dispatch tables, try-parse extraction, phase-based decomposition, helper function extraction — all within single-file constraint.
- qr module: updated copyright notice to reflect substantial refactoring (no longer a direct port).
Benchmark¶
- Custom HTML report generator with light/dark theme toggle and per-module benchmark pages for docs embedding.
- Corrected benchmark report color thresholds and AES classification.
Internal¶
- Added
complexipy>=5.2.0dev dependency and[tool.complexipy]configuration inpyproject.toml. - Enabled ruff
C901lint rule withmax-complexity = 20inpyproject.toml.
[2026.4.11] - 2026-04-11¶
Breaking Changes¶
- Versioning: adopted CalVer (
YYYY.M.patch) for project-level releases. Individual modules continue to use independent SemVer. Each release represents a stable snapshot of the CLI and all modules.
New Commands¶
zerodep dep-graph: display module dependency relationships — table view for all modules, or detailed view with transitive impact analysis for a single module (zerodep dep-graph yaml).zerodep dep-check: auto-detect changed modules (via content hash comparison against git tags), then run correctness tests for changed modules and all their downstream dependents. Exits with code 1 on test failure for CI integration. Accepts optional module names to check specific modules (zerodep dep-check yaml config).zerodep version-check: check which modules have been modified since their declared version tag (existed before, now refactored to share logic withdep-check).
Enhancements¶
- Module frontmatter: added
notefield to all modules pointing to CLI documentation, warning that manual file copy may miss required dependencies. zerodep add: now replaces the generic frontmatter note with a module-specific install command (e.g.,zerodep add config) when copying files to the user's project.- Module versioning: corrected all module-level versions to reflect actual per-module change history instead of blanket project-version bumps. Modules like
cache(0.2.0),prompt(0.2.0), andtabulate(0.1.0) now show their true version.
Internal¶
- Extracted
_find_changed_modules()helper fromcmd_version_checkto share change-detection logic betweenversion-checkanddep-check. - Added
_build_reverse_deps(),_transitive_dependents(), and_find_test_file()utility functions.
[0.4.1] - 2026-04-10¶
Performance¶
- Validate module: added
@functools.lru_cache(maxsize=None)caching to_typeddict_fields(),_dataclass_fields(),_find_discriminator(),_is_typeddict(),_is_dataclass_type(), and_unwrap_annotated()internal helpers. Eliminates redundantget_type_hints()and type introspection calls. Simple validation 3x faster (9.9 → 3.3 us), bulk data validation now 2x faster than pydantic.
Bug Fixes¶
- Validate module: added
_strip_required()helper to unwrapRequired[T]/NotRequired[T]wrappers before discriminated union matching. Previously, discriminated union dispatch could fail when union members usedRequired[Literal[...]]field annotations.
[0.4.0] - 2026-04-09¶
New Modules¶
- Semver module: PEP 440 version parser and comparator — zero-dependency drop-in replacement for
packaging.version. Supports full PEP 440 version scheme including epochs, pre/post/dev releases, local versions, and letter normalization. Benchmarked ~2x faster thanpackagingfor sorting. - Protobuf module: Zero-dependency proto3 encoder/decoder using Python dataclass schemas. Supports all proto3 scalar types (int32/64, uint32/64, sint32/64, fixed32/64, sfixed32/64, float32, double, bool, string, bytes), nested messages, packed repeated fields, map fields, enums, oneof groups, and unknown field preservation. Schema defined via
@messagedecorator +field(number)+Annotatedtype aliases — no.protofiles orprotocneeded. Proto3 semantics: zero-value fields omitted, packed repeated scalars by default. - Persistent Dict module:
MutableMapping-based persistent dictionary with pluggable backends (JSON file, SQLite) and pluggable serialization (JSON by default, no pickle). Thread-safe, atomic writes, namespace support via SQLite tables. Factory functionopen()auto-detects backend from file extension. - Dep Detect module: dependency detection and verification utility.
Enhancements¶
- zerodep CLI: new
outdatedcommand — compares local file content hashes against the upstream manifest, detecting actual content changes while ignoring metadata-only updates (version bumps). - zerodep CLI:
content_hashfield in manifest — SHA-256 digest of module file content with frontmatter stripped, enabling reliable change detection. - zerodep CLI:
last_updatedfield in manifest — ISO 8601 timestamp of the last git commit touching each module's primary file. - zerodep CLI: manifest generation now skips
build/anddist/directories to avoid registering stale build artifacts. - Skills module:
to_markdown()andfrom_dict()methods for round-trip SKILL.md serialization — programmatic skill authoring, templating, and migration. - Skills module: BM25 index caching — avoids redundant index rebuilds on repeated
select()calls with the same skill set. - Skills module:
min_scorethreshold onSkillRegistry.select()— filters out low-relevance results before injection into system prompts. - Skills module: recursive directory discovery (
discover(..., recursive=True)) — supports hierarchical skill layouts likecategory/sub-skill/. - Skills module: priority/override mechanism (
register(override=True),discover(override=True)) — enables project > user > system skill precedence. - Skills module: resource content inlining (
to_prompt(inline_resources=True)) — embeds scripts/references/assets file contents directly in the activation prompt XML. - Skills module: compatibility-based filtering (
filter_compatible(),available_toolsparameter onselect()) — filters skills by tool requirements against the current environment. - AES module:
aes_ecb_padded_size()utility function — calculates ciphertext size after PKCS7 padding without performing encryption.
[0.3.0] - 2026-04-01¶
New Modules¶
- File Lock module: cross-platform advisory file lock using only stdlib.
fcntl.flockon Unix/macOS,msvcrt.lockingwith exponential-backoff polling on Windows. Context manager support, non-blockingtry_lock(), auto parent-dir creation. - JSON-RPC module: JSON-RPC 2.0 protocol implementation with core data types (
JSONRPCError,JSONRPCRequest,JSONRPCResponse), exception hierarchy, method dispatcher with streaming support, and async transport over newline-delimited JSON streams. Benchmarked ~12-17x faster thanjsonrpcserver.
Enhancements¶
- Search module: Bayesian BM25 probabilistic calibration -- converts unbounded BM25 scores to calibrated [0,1] probabilities via sigmoid likelihood, composite prior, and Bayesian posterior. Supports auto-estimation of α/β from corpus statistics and optional base-rate correction. Calibration state persisted in JSON and SQLite.
- A2A module: extracted inline JSON-RPC layer into shared
jsonrpcmodule;A2AErrornow subclassesJSONRPCExceptionfor unified error handling. - ACP module: extracted inline JSON-RPC layer into shared
jsonrpcmodule; replaced 39-entry hardcoded camelCase rename map with algorithmic regex-based conversion; unified serialization to A2A-style single recursiveto_dict()with empty collection filtering.
Style¶
- Modernized type annotations: replaced
Optional/Dict/Listwith PEP 604/585 style. - Added
__all__exports to all modules. - Standardized section divider style across modules.
- Added
slots=Trueto frozen dataclasses. - Renamed httpclient test files for naming consistency.
- Standardized test file docstring format.
[0.2.2] - 2026-03-31¶
Enhancements¶
- HTTP Client: added
HttpClientErroras the common base exception; renamedConnectionError/TimeoutErrortoHttpConnectionError/HttpTimeoutErrorto avoid shadowing Python builtins (backward-compatible aliases kept). - Config module: added
ConfigErrorbase exception forUndefinedValueError. - Frontmatter module:
HandlerErrornow carries ahandlercontext field. - VCS module:
CommandErrornow captures partial output on timeout and includes atimeoutfield.
Internal Improvements¶
- Standardized error type conventions across all subsystem modules: two-level hierarchy,
<Module><Noun>Errornaming, f-string messages with context fields. - Documented subprocess execution conventions (binary discovery, timeout, encoding, return codes).
- Documented sync/async API mirroring conventions (naming, phase annotations, shared logic extraction).
- Documented large module internal layering conventions (section markers, ordering, phase annotations).
- All 8 patterns in
internals.mdare now Standardized or Implemented.
[0.2.1] - 2026-03-30¶
Enhancements¶
- VCS module:
MercurialandJujutsuconstructors acceptmerge_funcparameter for explicit three-way merge injection;detect()forwards it to the backend. - Config module:
Configconstructor acceptsloadersanddotenv_loaderparameters for explicit file-format loader and dotenv injection. - SSE module:
SSEClientandAsyncSSEClientconstructors accepttransportparameter for explicit HTTP transport injection; reconnection error handling adapts automatically.
Internal Improvements¶
- Introduced
_Unsetsentinel pattern across vcs, config, and sse modules for three-state injection parameters (_UNSET= auto-discover,None= disabled, callable = injected). - Added "Explicit Injection" section to internals documentation (English and Chinese).
[0.2.0] - 2026-03-30¶
New Modules¶
- Scheduler module: zero-dependency in-process task scheduler with cron expression support.
- Sparse Search module: BM25 family (BM25, BM25+, BM25L) and TF-IDF full-text search engine.
- Frontmatter module: parse and serialize YAML/TOML/JSON file-header metadata.
- Config module: unified multi-source configuration loader with env vars, .env files, JSON/JSONC/YAML/TOML/INI support, type coercion, and prefix support.
- Cache module: in-memory caching with LRU/FIFO/LFU/TTL eviction, sync+async decorator support, thread-safe, cache statistics.
- Runner module: structured subprocess execution with sync+async APIs, streaming output (callbacks + iterators), SIGTERM-to-SIGKILL timeout escalation, environment isolation, and command allowlist/blocklist.
- XML module: xmltodict-compatible dict-to-XML converter with LLM tag extraction.
Enhancements¶
- HTTP Client: connection pooling with configurable pool size and idle timeout.
- HTTP Client: transparent gzip/deflate auto-decompression for regular and streaming responses.
- HTTP Client: HTTP/HTTPS proxy support with CONNECT tunneling.
- HTTP Client: Basic and Digest authentication with automatic 401 challenge-response.
- VCS module: workspace, branch, and commit lifecycle operations.
zerodepCLI tool for module discovery and dependency-aware copying.- zerodep CLI: recursive module scanning with nested directory support and duplicate name detection.
- Migrated module metadata from
__version__/__deps__to PEP 723 inline script metadata (frontmatter). - Reverse index optimization for sparse search performance improvement.
Bug Fixes¶
- Runner: align async partial output handling and process reaping with sync path.
- Scheduler: tighten lock discipline around job state transitions to fix race conditions.
- HTTP Client: resolve sync/async drifts and enrich error context.
- HTTP Client: resolve
tytype-check errors.
Internal Improvements¶
- Tier 1 refactoring: normalize sibling import patterns across config, sse, and vcs modules; lazy-load config sibling modules and diff module in vcs to reduce import-time side effects; align terminal color detection across prompt and structlog; annotate cleanup paths with tier classification comments.
- Tier 2 refactoring: reorganize httpclient into 12-layer internal sections for clarity; add 14-section structure and sync/async alignment audit to runner; clarify scheduler concurrency model and add error conventions.
[0.1.0] - 2026-03-27¶
Added¶
- AES module: AES encryption/decryption with ECB, CBC, CTR, and GCM modes; supports 128/192/256-bit keys.
- QR Code module: QR code generation with zero external dependencies.
- HTTP Client module: synchronous and asynchronous HTTP client with streaming response and file upload support.
- Dotenv module:
.envfile parser and loader. - YAML module: YAML parser and emitter.
- JSONC module: JSON with Comments (JSONC) parser.
- Retry module: configurable retry decorator with backoff strategies.
- Structured Logging module: structured logging with JSON output and terminal color support.
- TOON module: Token-Oriented Object Notation serializer/deserializer.
- Tabulate module: plain-text table formatting.
- Soup module: lightweight HTML parsing.
- Prompt module: interactive terminal prompt utilities.
- Validate module: TypedDict/dataclass runtime validator with JSON Schema generation.
- SSE module: Server-Sent Events (SSE) client.
- Markdown module: Markdown to HTML renderer.
- Diff module: unified and context diff generation.
- VCS module: version control system utilities.
- ANSI module: ANSI terminal styling with automatic color detection.
__version__attribute added to all modules for cross-module compatibility checks.tytype checker configuration inpyproject.toml.- CI workflow for compatibility testing across Python 3.10–3.13.
Fixed¶
- Async client body reading race condition in HTTP client.
- Type errors across multiple modules detected by
tytype checker.
Changed¶
- Aligned terminal color detection logic across prompt, structlog, and ansi modules.
- Replaced
httpbin.orgwith local test server for reliable HTTP correctness tests.
Removed¶
typing_extensionsdependency from validate module.