NameError: name 'PathDistribution' is not defined

Open Beginner friendly
#525 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
tooling

Research direction

Start at MetadataPathFinder.find_distributions() around line 967 and inspect the later PathDistribution definition at line 982. Reproduce the import or distribution lookup that triggers the NameError, then verify that the Celery backend-extension loading path no longer fails.

Written by the indexing model from the issue text.

Description

Bug in importlib-metadata 8.7.0 where MetadataPathFinder.find_distributions() uses PathDistribution class before it's defined (line 967 uses it, line 982 defines it). Celery triggered this when loading backend extensions.

Dominant language
Python
Stars
142
Forks
97
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python/importlib_metadata

All issues in python/importlib_metadata

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.