Releases: hc-ui/whoseport
Releases · hc-ui/whoseport
Release list
v0.2.0 - wait for it
The "wait for it" release. 98 tests green on 3 OS x Python 3.9-3.14.
Added
--wait [SECONDS]— block until the port is free (default 30s). Exit0once free,3on timeout. Replaceswhile ! whoseport 8080; do sleep 1; doneloops in CI and restart scripts, and it works with--jsontoo:whoseport 8080 --wait 60 && ./start-server.sh- Terminal demo graphic in the README.
- Library usage documented:
import whoseport; whoseport.collect(ports={8080}).
Fixed
- Backend failures during post-kill verification print a warning instead of a traceback.
- Ctrl+C exits cleanly with code 130.
- Grammar: "ports 3000, 8080" for multi-port kill summaries.
- CI: checkout v5 / setup-python v6 / upload-artifact v5 (Node 20 deprecation warnings gone).
v0.1.1 - sharper advice, honest JSON
Self-review round after v0.1.0. All 88 tests green on 3 OS x Python 3.9-3.14.
Added
- Situational advice: recognizes Docker/container port-forwarders (
docker-proxy,vpnkit, ...) and suggests stopping the container; recognizes Windows kernel-owned ports with port-specific guidance (http.sys vs SMB/NetBIOS vs generic drivers). --json --killnow reports"port_freed"so scripts and agents know whether the port actually opened up.- Hint to retry with
--forcewhen a process survives SIGTERM.
Fixed
--force/--yeswithout--killfail fast instead of being silently ignored.- Rare TCP CLOSE/CLOSED states classified as lingering (post-kill verification can't dead-lock on them).
/procreads use UTF-8 (non-ASCII process names intact).- Explicit ctypes signature for
GetStdHandle(64-bit handle hygiene). - Kernel TIME_WAIT leftovers render as
-instead of a misleading process name. - Post-kill verification window: 3s -> 5s for graceful SIGTERM shutdowns.
v0.1.0 - Whose port is it anyway?
First release.
whoseport - one command to see which process is using a port, and free it if you want. Pure Python stdlib, zero dependencies, Windows/macOS/Linux.
\\�ash
pip install whoseport # or grab the wheel below
whoseport 8080 # who's on 8080?
whoseport 8080 --kill # free it (asks first)
\\
Highlights
- Zero dependencies - no psutil, no compiled wheels. Linux reads /proc directly, Windows calls iphlpapi via ctypes (locale-proof - no netstat text parsing), macOS drives the bundled lsof in machine-readable mode.
- Look before you kill - table with PID, process name, command line and state; connection noise collapsed.
- Safe kill - confirmation, SIGTERM first, refuses system PIDs, verifies the port is actually free afterwards.
- Script/agent friendly - --json, meaningful exit codes (1 = port free).
- Tested end-to-end on 3 OS x Python 3.9-3.14 (79 tests, real sockets, real kills).