python / importlib_metadata

Library to access metadata for Python packages
https://importlib-metadata.readthedocs.io
Apache License 2.0
123 stars 80 forks source link

metadata directories appearing in packages_distributions #442

Closed jaraco closed 1 year ago

jaraco commented 1 year ago

I wonder if this adds the metadata directories into the output of packages_distributions() as import names. After this was merged, I'm seeing entries like these returned from packages_distributions():

 'black-23.1.0.dist-info': ['black'],
 'filelock-3.10.0.dist-info': ['filelock'],
 'iniconfig-2.0.0.dist-info': ['iniconfig'],
 'more_itertools-9.1.0.dist-info': ['more-itertools'],
 'typing_extensions-4.5.0.dist-info': ['typing_extensions'],

IMHO, these should never occur here, as they are not importable modules.

_Originally posted by @jherland in https://github.com/python/importlib_metadata/issues/432#issuecomment-1475088318_