Skip to content

AttributeError: 'PathDistribution' object has no attribute '_normalized_name' #396

@jaraco

Description

@jaraco

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:

Perhaps importlib_metadata should provide a compatibility shim to honor name normalization in distributions not supplying it (or at least not crash).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions