Skip to content

v3.2.0

Choose a tag to compare

@kjanat kjanat released this 08 Jun 05:08
· 52 commits to master since this release
v3.2.0
b314f9a

PyPI

Added

  • Windows shim support (bw.cmd/bw.bat/bw.ps1) -- Installer methods put
    different shims on PATH and CreateProcess can only run real .exe/.com
    images. resolve_bw_command now resolves all flavours, most-reliable first:
    native bw.exe/bw.com run directly; bw.cmd/bw.bat are routed through
    cmd.exe /c (invoked by basename from their own directory to avoid
    shell-quoting issues); and a bw.ps1 (which isn't in PATHEXT, so
    shutil.which can't see it) is found on PATH and run through PowerShell. So
    when npm ships both bw.cmd and bw.ps1, the cmd shim is preferred.
    terminate_serve tears the bw serve process tree down with taskkill /F /T
    so the real server isn't orphaned behind a cmd.exe/PowerShell wrapper. A
    windows-bw-cmd CI job installs bw via npm and runs a live smoke test
    (tests/windows_bw_cmd_smoke.py) covering shim invocation (bw --version) and
    cmd.exe-wrapped process-tree teardown. Fixes #8.

Fixed

  • Missing bw CLI traceback -- When the Bitwarden CLI (bw) was not on
    PATH, kp2bw crashed with a long, intimidating FileNotFoundError
    traceback from subprocess. The CLI now checks for bw up front (before
    prompting for passwords) and exits cleanly with an actionable message; any
    BitwardenClientError/ConversionError raised during conversion is reported
    the same way instead of as a stack trace. BitwardenServeClient raises a
    BitwardenClientError rather than letting FileNotFoundError escape.
    Detection uses shutil.which, so Windows bw.exe/bw.cmd shims are found via
    PATHEXT; the bw subprocess calls also catch FileNotFoundError, so a
    genuinely missing CLI still yields the friendly message. Fixes #5.
  • Chained {REF:...} references -- a reference whose target was itself
    another reference entry (a chain A -> B -> C) raised KeyError in
    _resolve_entries_with_references, logged a Could not resolve entry
    warning, and dropped the referencing entry from the import even though
    KeePass resolves such chains correctly. Unresolved targets that are
    themselves REF entries are now resolved transitively and on demand, with
    memoization and cycle detection, so the chain collapses onto whatever it
    ultimately maps to. Fixes #6.
  • Malformed {REF:...} tokens no longer abort the run -- a reference whose
    field/lookup part lacked the @ separator (e.g. {REF:UI:...}) raised an
    uncaught ValueError in _parse_kp_ref_string that stopped the whole
    migration. Such tokens are now reported and the offending entry is skipped,
    consistent with other unresolvable references.

What's Changed

Full Changelog: v3.1.0...v3.2.0