raimon49 / pip-licenses

Dump the license list of packages installed with pip.
MIT License
307 stars 43 forks source link

#113 Support latest pip version #114

Closed SlavaSkvortsov closed 2 years ago

SlavaSkvortsov commented 2 years ago

Fixes issue #113. In pip==21.3 get_installed_distributions function was removed. I copied this function from pip with removing unused params

I think the best solution would be migrating the whole library to importlib.metadata (it has a backport) because pip deprecates usage of their internal API. But as a hotfix, we can use this solution.

codecov[bot] commented 2 years ago

Codecov Report

Merging #114 (0af915b) into master (61c7cba) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #114   +/-   ##
=======================================
  Coverage   98.97%   98.97%           
=======================================
  Files           1        1           
  Lines         390      390           
=======================================
  Hits          386      386           
  Misses          4        4           
Impacted Files Coverage Δ
piplicenses.py 98.97% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 61c7cba...0af915b. Read the comment docs.

raimon49 commented 2 years ago

@SlavaSkvortsov Thanks for the great contribution!

The matrix test has been added, which is good 👍