spotfiresoftware / spotfire-python

Package for Building Python Extensions to Spotfire®
Other
18 stars 6 forks source link

Handle deprecation of 'pkg_resources' module in 'setuptools >= 67.5.0' #59

Closed bbassett-tibco closed 9 months ago

bbassett-tibco commented 11 months ago

The 67.5.0 release of 'setuptools' added a DeprecationWarning to the pkg_resources module. This affects us when we run the spotfire.spk command line utility:

C:\src\spotfire-python>python -m spotfire.spk packages --help 
C:\src\spotfire-python\spotfire\spk.py:27: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
usage: python -m spotfire.spk packages [-h] [-v VERSION] [-f] [--versioned-filename] [-n NAME] [-c FILE] [--analyst] [--cert FILE] [--password PASSWORD] [--timestamp URL] [--sha256]
                                       spk-file requirements

...

Explore migrating to the packaging package (https://pypi.org/project/packaging, which was vendored into pkg_resources) to handle the requirements file parsing that pkg_resources is used for.