python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

Missing dependency on setuptools

Open albertvaka opened this issue 1 year ago • 2 comments

setuptools is no longer installed by default in python 3.12: https://github.com/python/cpython/pull/101039

_sinricpro_websocket.py depends on it, causing this exception if not installed:

 File ".../_sinricpro_websocket.py", line 16, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

It should be added as an explicity dependency.

albertvaka avatar Jan 30 '24 12:01 albertvaka

Alternatively, since pkg_resources is also deprecated, we could depend on importlib_metadata instead and change the code to:

version = importlib_metadata.version("sinricpro")

albertvaka avatar Jan 30 '24 12:01 albertvaka

Hi @albertvaka

Thanks for letting us know. Haven't looked into 3.12.

Hey @cojmeister are you still working on the PR https://github.com/sinricpro/python-sdk/pull/65 ? If there's nothing else I can I can merge the PR and can take a look at upgrading the master codebase to 3.12.

kakopappa avatar Feb 01 '24 10:02 kakopappa