Skip to content

Restore string input handling in Pairs - #207

Open
Imkkey wants to merge 1 commit into
beetbox:mainfrom
Imkkey:fix/pairs-string-inputs
Open

Imkkey wants to merge 1 commit into
beetbox:mainfrom
Imkkey:fix/pairs-string-inputs

Conversation

@Imkkey

@Imkkey Imkkey commented Oct 2, 2026

Copy link
Copy Markdown

Restore the input normalization that Pairs inherited from StrSeq before the typing refactor. Currently, config['sources'].as_pairs() turns filesystem coverart into one pair per character, bytes fail validation, and non-iterable values leak TypeError instead of ConfigTypeError.

Decode byte strings, split scalar strings on whitespace, and check that other inputs are iterable before converting the pairs. Preserve list, tuple, generator, and sequence-protocol inputs, plus existing defaults. Add regression tests and a changelog entry.

Validation on Python 3.12.14:

  • New tests on unchanged main: 17 fail, 10 pass
  • With the fix: all 27 new cases and all 326 core tests pass
  • Full suite after building docs: 327 pass; the existing release-tool changelog-underline test fails identically on the clean base (300 pass, same 1 failure)
  • Ruff lint/format, mypy targeting CI's Python 3.10, strict Sphinx build, documentation formatting/lint, and git diff --check pass

Prepared with OpenAI Codex assistance. The regression was reproduced locally against both current main and v2.1.0.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant