v0.1.2
Supersedes 0.1.1, which was tagged but never published: a release-gate test
timed out on the Windows/Python 3.14 runner, so nothing reached PyPI. There is
no 0.1.1 release; its fix is included here.
Added
uri_hostname(parsed)returns the host as it was written in a URI, rather
than the case-folded spellingurlsplit().hostnameproduces. Use it in
_from_parsed_uriwherever a host is stored; presence checks can keep using
.hostname, since emptiness does not depend on case.
Changed
-
A config built from a URI now stores the hostname as typed, so
HostConfig("ssh://nasA")keepsnasAin.host, inconnection_uri, and
in theHostInfo.hostnamea system host reports without connecting. It
previously storedurlsplit's lowercased form, which meant the library
echoed a spelling the operator never wrote and left downstream code to
recover the original from the URI itself.Consequently
.hostis the spelling that was given, not a canonical form:
HostConfig("ssh://nasA")andHostConfig("ssh://nasa")no longer compare
equal, so code using a config or its host as a dict key or for
deduplication should casefold explicitly. Resolution is unaffected — DNS,
SSH, and WinRM all treat the two spellings as one name.
Fixed
redact_uri()no longer case-folds the hostname. Only the branch that
rebuilt the authority — the one taken when a password was present — adopted
urlsplit's lowercasedhostname, sonasArendered asnasawith a
credential and asnasAwithout one. The same host now renders one way
whichever branch runs, and log records stay greppable by the name the
operator typed. Redaction removes a credential; normalizing a host is a
separate concern and is left to the transport that resolves it.- The spawn conformance test no longer fails on a slow runner. It waited 10s
for a realpowershell.exe -NoProfileto start, exit, and be reaped, which
a cold Windows CI runner can exceed. The wait is a hang guard rather than a
performance assertion, so it is now 60s. Test-only; no library change.
Full Changelog: v0.1.1...v0.1.2