Commit f6e1f936 by David Hotham Committed by GitHub

handle importlib-metadata deprecation (#7774)

parent 860c8387
......@@ -257,9 +257,8 @@ class InstalledRepository(Repository):
if path in skipped:
continue
try:
name = canonicalize_name(distribution.metadata["name"])
except TypeError:
name = distribution.metadata.get("name") # type: ignore[attr-defined]
if name is None:
logger.warning(
(
"Project environment contains an invalid distribution"
......@@ -271,6 +270,8 @@ class InstalledRepository(Repository):
skipped.add(path)
continue
name = canonicalize_name(name)
if name in seen:
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment