Open hagenw opened 1 year ago
Since Python 3.8 it should be sufficient to use the build-in importlib.metadata module.
importlib.metadata
Looking at https://docs.python.org/3/library/importlib.metadata.html#mapping-import-to-distribution-packages packages_distributions() is indeed only available in importlib.metadata since Python 3.10, so we cannot use it for earlier versions and still have to use importlib-metadata.
packages_distributions()
importlib-metadata
Since Python 3.8 it should be sufficient to use the build-in
importlib.metadata
module.Looking at https://docs.python.org/3/library/importlib.metadata.html#mapping-import-to-distribution-packages
packages_distributions()
is indeed only available inimportlib.metadata
since Python 3.10, so we cannot use it for earlier versions and still have to useimportlib-metadata
.