Skip to content

Remove legacy byte-path compatibility helpers #6973

Description

@snejus

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, and syspath from beets.util.
  • Replace user-facing path formatting with normal string formatting of Path values.
  • Replace filesystem calls with Path methods or standard library calls that accept Path.
  • 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.fsdecode or os.fsencode calls are tied to explicit serialization boundaries.
  • User-facing path output remains stable.
  • poe test and poe lint pass with coverage at or above 80%.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions