Skip to content

2.6.2

Choose a tag to compare

@jandado jandado released this 01 Oct 09:49
· 14 commits to main since this release

smartbox v2.6.2

Port round of upstream PR #64 (improvements/fix_bugs, 19 commits). Every commit was audited intent-level against this tree — full per-commit verdicts and evidence in ajtudela-pr-64-audit.md. Ten commits were independently fixed by the 2.6.x round; of the remainder, seven were ported, one declined by decision, one is upstream-only.

Bug fixes

  • set_node_setup can no longer wipe undeclared setup keys on the device (upstream 5618aa3). The setup endpoint requires the whole configuration to be re-posted; the read-modify-write GET is now always raw, so keys the setup models do not declare (e.g. counter_offset on pmo nodes) survive every write. Completed with extra="allow" on DefaultNodeSetup/PmoSetup: typed (raw_response=False) reads keep unknown keys and round-trip losslessly.
  • Common exception root (upstream 62efcf8): InvalidAuthError, APIUnavailableError and ResellerNotExistError now derive from SmartboxError — one except SmartboxError catches every library failure. APIUnavailableError keeps its aiohttp.ClientConnectionError base for backwards compatibility; the data-path 403 → SmartboxError mapping is kept deliberately.
  • CLI: unknown -d/-n values raise click.BadParameter with a param_hint (exit code 2, usage line rendered, offending option named) instead of a generic error; malformed wire node payloads stay runtime errors (upstream 6ad2014).

Build & docs

  • Core dependencies bounded to their current major: aiohttp>=3,<4, pydantic>=2,<3, python-socketio>=5,<6 (upstream da3bb9c).
  • .vscode/settings.json: pylint/flake8 editor settings replaced with the ruff formatter/code-actions setup (upstream a78bc3a).
  • CODEOWNERS co-owner and README badge reflow adopted from upstream (upstream 2ec1ef0).
  • README staleness fixes: duplicate empty Installation heading removed, --basic-auth-creds long option corrected, Python floor >=3.14.2, tox -e py314, basic-auth pointer moved to api-notes.md.

Tests

  • test_all_resellers (real HTTP calls to twelve reseller servers) moved behind a network marker, deselected by default; run on demand with pytest -m network. Sessions in it are closed (upstream 0bef64c).

Deliberately not ported

  • The catch-all DefaultNodeStatus fallback (upstream 6d592bf): typed mode (raw_response=False) keeps rejecting sparse payloads with SmartboxValidationError and the offending wire payload attached — the documented bare {"sync_status": "lost"} dead-node frame is first-class in that design, and silently-None fields would hide firmware drift. Rationale in the audit doc.

Full changes since 2.6.1: see the 2.6.2 section of the CHANGELOG.