sinricpro / python-sdk

python3 sdk for sinric pro.
https://sinric.pro
23 stars 9 forks source link

Missing dependency on setuptools #66

Open albertvaka opened 5 months ago

albertvaka commented 5 months ago

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 commented 5 months ago

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

version = importlib_metadata.version("sinricpro")
kakopappa commented 5 months ago

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.