twelvedata / twelvedata-python

Twelve Data Python Client - Financial data API & WebSocket
https://twelvedata.com
MIT License
392 stars 57 forks source link

[Bug]: Setuptools not installed as a requirement, but module won't load without it. #88

Closed EdgyEdgemond closed 2 months ago

EdgyEdgemond commented 2 months ago
    from pkg_resources import get_distribution, DistributionNotFound
ModuleNotFoundError: No module named 'pkg_resources'

twelvedata python package depends on setuptools being installed to access pkg_resources, but does not define it as a dependency, so if setuptools is not installed due to an incidental requirement of another package, the module fails to load.

Would be helpful if setuptools was installed when twelvedata is installed, or preferably removing use of pkg_resources which is being deprecated in favor of importlib.metadata.get_version("twelvedata") to fetch the version.

sgacode commented 2 months ago

Fixed in version 1.2.23