pip-tree icon indicating copy to clipboard operation
pip-tree copied to clipboard

DeprecationWarning: pkg_resources is deprecated as an API

Open Justintime50 opened this issue 2 years ago • 2 comments

venv/lib/python3.11/site-packages/pkg_resources/__init__.py:121
  /Users/jhammond/git/personal/pip-tree/venv/lib/python3.11/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)

Justintime50 avatar Aug 25 '23 01:08 Justintime50

This would mean finding a replacement for pkg_resources.find_distributions

Some pointer:

  • https://docs.python.org/3/library/importlib.metadata.html#extending-the-search-algorithm
  • https://github.com/python/importlib_metadata/issues/131

Borda avatar Oct 26 '23 02:10 Borda

Hey @Borda, thanks for the pointers! I've been looking at those actually but haven't had a chance yet to play with the code, would you want to take a crack at it? In a perfect world we'd drop in the new importlib package with as minimal code changes as needed to get the same results.

Justintime50 avatar Oct 26 '23 18:10 Justintime50