Skip to content

Add Python 3.13/3.14 compatibility hardening and WAV guardrail tests#33

Merged
erodola merged 6 commits into
mainfrom
feature/compat
Apr 11, 2026
Merged

Add Python 3.13/3.14 compatibility hardening and WAV guardrail tests#33
erodola merged 6 commits into
mainfrom
feature/compat

Conversation

@erodola

@erodola erodola commented Apr 11, 2026

Copy link
Copy Markdown
Owner

Summary

This PR finalizes Python compatibility hardening across supported versions and adds explicit guardrails around WAV sample I/O behavior.

Compatibility/runtime changes

  • Expand declared support to Python 3.10 through 3.14.
  • Add conditional dependency:
    • audioop-lts; python_version >= 3.13
  • Avoid import-time failures on 3.13+ by moving pydub imports to WAV-only code paths in:
    • src/nodmod/modsong.py
    • src/nodmod/xmsong.py
  • Add clear ImportError messages when WAV dependencies are missing.

CI + docs

  • Expand CI matrix to run tests on 3.10, 3.11, 3.12, 3.13, 3.14.
  • Update README requirements section to reflect supported versions and marker-based dependency behavior.

New tests

  • Add lazy-import guardrails:
    • tests/test_python_compat_guardrails.py
    • Verifies import nodmod does not require pydub at module import time.
    • Verifies WAV APIs fail with clear scoped errors when pydub is unavailable.
  • Add fixture-hash WAV stability checks:
    • tests/test_wav_fixture_hashes.py
    • Verifies deterministic sample load/save hashes for XM and MOD paths.

Validation

  • Local suite:
    • uv run --with pytest pytest -q tests
    • 155 passed
  • Full matrix in isolated envs:
    • Python 3.10: 155 passed
    • Python 3.11: 155 passed
    • Python 3.12: 155 passed
    • Python 3.13: 155 passed
    • Python 3.14: 155 passed
  • Fresh install checks:
    • 3.12: audioop-lts not installed (expected)
    • 3.13: audioop-lts installed automatically (expected)
  • Cross-version WAV probe (3.10-3.14): consistent waveform/frame hashes observed for tested fixture.

Notes

I closed issue #30 after implementing and validating the compatibility work. This PR is ready for your final review/merge checks.

@erodola erodola merged commit dd61343 into main Apr 11, 2026
6 checks passed
@erodola erodola deleted the feature/compat branch April 11, 2026 15:28
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