Describe the bug
19 package_names = {dist.metadata["Name"] for dist in dists}
20 package_versions = {pkg_name: version(pkg_name) for pkg_name in package_names}
21 # developer note:
22 # we cannot just use distributions naively,
23 # because the same top level package name may appear *twice*,
(...) 26 # the "version" contract ensures we always get the version that corresponds
27 # to the importable distribution, i.e., the top one in the sys.path.
TypeError: 'NoneType' object is not subscriptable
-->
To Reproduce
Versions