Skip to content

Fix the library and modernize the project - #12

Merged
pganssle merged 10 commits into
pyminimp3:masterfrom
pganssle:modernize
Aug 1, 2026
Merged

pganssle merged 10 commits into
pyminimp3:masterfrom
pganssle:modernize

Conversation

@pganssle

Copy link
Copy Markdown
Collaborator

Turns out this library has been broken all along, but this fixes it. I have been neglecting it so long that it was previously only set up to be tested in Python 3.6 and 3.7 using Travis and with all the build configuration in setup.py, so, I've also gone ahead and done some basic modernization.

pganssle added 10 commits July 16, 2026 09:44
This seems to be doing some frame decoding now, but not like... well.
In order to fix this, we needed to preallocate the PCM array before
passing it to minimp3, match and initialize the existing C structures
and pass buffer.data.as_uchars directly instead of passing a
null-terminated string (buffer.data.as_uchars[:]).

Turns out I was also not comparing apples to apples with the mp3 and wav
comparsion, either.
The package metadata and test configuration still targeted Python 3.6 and 3.7. Update the supported-version classifiers, tox environments and development dependency minimums for Python 3.10+.
Run the test suite on Python 3.10, 3.14 and free-threaded 3.14 under Ubuntu and Windows. Add a separate job for the Black and isort checks.
The implementation is a Cython extension, so describe its Python-facing interface in a stub and mark the package as typed. Re-export that interface from pyminimp3 and check the source tree with pyrefly in tox and CI.
Keep setuptools as the build backend, but move the package metadata, package discovery, typed package data and Cython extension declaration into pyproject.toml. Update the build tox environment to build and check both distributions.

Make the source distribution manifest explicit so local virtual environments and scratch files are not swept up by the old recursive Python glob.
@pganssle
pganssle merged commit c6ca464 into pyminimp3:master Aug 1, 2026
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