Remove legacy byte-path compatibility helpers
Author: snejusCreated Sep 1, 2026Updated Sep 29, 2026
Labelscore
Part of: #1409
Depends on: all #6809 child issues and the prune_dirs Path-only cleanup.
Problem
displayable_path, bytestring_path, syspath, and broad os.fsdecode usage exist to support the old byte-path model. Once runtime APIs use Path and SQL encoding is private to the database boundary, these helpers become misleading compatibility surface area.
Expected behavior
- Remove
displayable_path,bytestring_path, andsyspathfrombeets.util. - Replace user-facing path formatting with normal string formatting of
Pathvalues. - Replace filesystem calls with
Pathmethods or standard library calls that acceptPath. - Keep byte decoding only where the input is genuinely byte data from SQL, persisted state, or an external binary API.
- Preserve Windows behavior covered by existing tests or replace deleted helper tests with boundary-focused tests.
Suggested fix
Delete the helpers after their callers have migrated. Update remaining call sites in core, UI, plugins, tests, and docs so byte conversion is no longer treated as a general-purpose path utility.
Acceptance criteria
- No callers import the deleted helpers.
- Remaining
os.fsdecodeoros.fsencodecalls are tied to explicit serialization boundaries. - User-facing path output remains stable.
poe testandpoe lintpass with coverage at or above 80%.
Source: beetbox/beets