craffel / pretty-midi

Utility functions for handling MIDI data in a nice/intuitive way.
MIT License
856 stars 151 forks source link

fix: Remove `pkg_resources` #245

Open BenjaminHalko opened 6 months ago

BenjaminHalko commented 6 months ago

pkg_resources is depreciated in Python 3.12. This PR replaces it with importlib.resources.

craffel commented 6 months ago

Thanks, but pkg_resources is still used to get the default SF2 path: https://github.com/craffel/pretty-midi/blob/280352a75c53901eb9b0e4f4dffa416ad041fa33/pretty_midi/fluidsynth.py#L52 That would need to be fixed (and we'd need to verify that, after applying this PR, the library could be installed with the default SF2 in place and usable by the fluidsynth code).