Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace deprecated
pkg_resources
with stdlib (#239)
`pkg_resources` has been deprecated by `setuptools` for quite a while: https://setuptools.pypa.io/en/latest/pkg_resources.html It's got some bugs/warts: * pypa/setuptools#2531 * https://discuss.python.org/t/will-setuptools-remove-pkg-resource-module-in-the-future/27182 So switch to using `importlib` functions which are part of the Python standard library as of `3.8`. This is less error-prone, and also removes the need for `setuptools` to be installed in order for this panel to work. I realize we technically still support `3.7`, but I thought it was fine to change this particular panel to require `3.8`, as `3.7` support is best effort given that it's now EOL'd by the core Python team. I also removed the relative path location for specific libraries as it was simply blank for me on Python 3.12... I think showing the location of the site packages directory should suffice. If someone later wants to build this out further, they're more than welcome to. Note that `importlib.metadata.distributions()` does have an outstanding issue that it reports a local editable install twice, but they plan to eventually fix that: * pypa/setuptools#4170
- Loading branch information