Repository navigation
v1.7.0 — 2026-09-10
Minor release. Migrates the HTTP stack from httpx to Pydantic's maintained
httpx2 fork, and keeps httpx2 off the nsc --help cold-start path. No
user-facing CLI or behavior changes.
Changed
- Migrated the HTTP stack from
httpxtohttpx2(#146).httpx2is
Pydantic's stewardship continuation of httpx (same author, API-identical) —
httpx itself has seen limited activity, and httpx2 is the reliably-maintained
path forward with timely security updates. The dependency floor is now
httpx2>=2.5; the source layer is a mechanical rename (import httpx2,
httpx2.Client/httpx2.Response/…). Test mocking moves from globalrespx
to thepytest-httpx2plugin'shttpx2_mockfixture (arespx.Router, by
respx's own author), which targets httpx2'shttpcore2transport. No
user-facing behavior or CLI surface changes. - httpx2 is now kept off the
nsc --help/ cold-start path (#13). httpx2 is
the single heaviest import in the tree (~65ms cold), and nothing on the startup
path needs an HTTP client. It was being pulled in eagerly through the
runtime → client → retry chain (pluscache,schema, andlogin
command modules). All of these now import httpx2 lazily, at first request. Cold
startup drops by roughly httpx2's import cost, bringing the median back under the
300ms project target. A new guard test (test_lazy_httpx2_import.py) asserts
httpx2 never loads onnsc --help, and the startup benchmark's threshold is
re-baselined to 300ms so an over-threshold skip once again signals a real
regression instead of firing on every run.