Skip to content

v0.2.0

@caidurbin caidurbin tagged this 30 May 03:56
Library v0.2.0 additions for the forthcoming Home Assistant integration
(ADR 0011 — the library owns the protocol boundary):

- Rename DMP168.get_uptime() -> get_uptime_raw(); add get_uptime() -> timedelta
- Add uptime_parser.parse(): pure-function DDDD:HH:MM:SS -> timedelta, a sibling
  of status_parser, raising ParseError on every non-conforming input
- Add SystemStatus.to_dict(); format_status() --json now delegates to it so the
  CLI surface can't drift from the serializer
- Ship blustream/py.typed (PEP 561), wired into the wheel and sdist
- Bump __version__ to 0.2.0

Parser hardening: translate timedelta overflow and the CPython int-from-string
limit into ParseError (previously leaked OverflowError / ValueError to callers),
reject non-ASCII Unicode digits via re.ASCII, anchor the pattern with \Z, and
match the [ERROR] prefix case-insensitively (mirroring execute_command).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Assets 2
Loading