timmahrt / praatIO

A python library for working with praat, textgrids, time aligned audio transcripts, and audio files. It is primarily used for extracting features from and making manipulations on audio files given hierarchical time-aligned transcriptions (utterance > word > syllable > phone, etc).
MIT License
311 stars 33 forks source link

`pkg_resources` deprecation error #58

Closed JoFrhwld closed 11 months ago

JoFrhwld commented 11 months ago

Running tests on a project that imports praatio, I get the following deprecation warning:

DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

I think the more useful link might be here: https://importlib-resources.readthedocs.io/en/latest/migration.html#pkg-resources-resource-filename

https://github.com/timmahrt/praatIO/blob/0f0544e5a897f05993cbe183836f3773dcd817a8/praatio/utilities/utils.py#L9

timmahrt commented 11 months ago

Thanks for letting me know about this!

I wasn't able to replicate the deprecation warning locally for whatever reason, but it is deprecated. I opened a PR which I hope should resolve the issue: https://github.com/timmahrt/praatIO/pull/59

I've already merged it and released a new praatio version 6.1, which includes this fix in it. If you upgrade and the deprecation warning goes away, please let me know. Thank you!

JoFrhwld commented 11 months ago

Sure thing! I was only getting the warning while running pytest tests with my own package, python v3.10