-
-
Notifications
You must be signed in to change notification settings - Fork 92
Closed
Description
When importlib_metadata introduced the name normalization in PathDistributions starting in v4.3, it introduced a subtle incompatibility in select environments.
In particular, if a provider uses an older importlib metadata (importlib_metadata < 4.3 or importlib.metadata on Python < 3.10), and in that provider they supply PathDistributions, calls to resolve entry points will fail when any distribution doesn't have a _normalized_name attribute.
This issue was reported in several issues including:
- [BUG] vendored importlib.metadata of setuptools 60.9.0 fails with 'PathDistribution' object has no attribute '_normalized_name' pypa/setuptools#3102
- [BUG] Setuptools crashes when implementing
find_distributionsin a custom Finder in python 3.8 pypa/setuptools#3319 - [BUG]
AttributeError: 'PathDistribution' object has no attribute '_normalized_name'with setuptools 60.9.0+ pypa/setuptools#3452
Perhaps importlib_metadata should provide a compatibility shim to honor name normalization in distributions not supplying it (or at least not crash).
crackwitz
Metadata
Metadata
Assignees
Labels
No labels