Skip to content

gh-134740: Add missing documentation for importlib.metadata.distributions() #134749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ashm-dev
Copy link
Contributor

@ashm-dev ashm-dev commented May 26, 2025

Summary of Changes

Add documentation for:

  • importlib.metadata.distributions() function
  • DistributionFinder class
  • DistributionFinder.Context class

These items were part of the public API (included in __all__) but were missing from the documentation. The PR adds proper documentation for these items in the same style as the existing documentation, including descriptions of parameters and return values.

Issue Details

The issue was reported in gh-134740 where it was noted that importlib.metadata.distributions() is not listed in the documentation despite being in __all__ and referred to in the docstrings for several other module items. The DistributionFinder and DistributionFinder.Context classes were also missing from the documentation.

Changes Made

  1. Added function documentation for distributions() in the "Distributions" section
  2. Added class documentation for DistributionFinder
  3. Added class documentation for DistributionFinder.Context
  4. Added a reference label for the "Implementing Custom Providers" section

Related Issues

Closes #134740
Related to #134740


📚 Documentation preview 📚: https://cpython-previews--134749.org.readthedocs.build/

@python-cla-bot
Copy link

python-cla-bot bot commented May 26, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

…tions()

Add documentation for the distributions() function, Distribution.discover() method,
and DistributionFinder classes that were missing from the importlib.metadata
documentation despite being part of the public API.
@ashm-dev ashm-dev force-pushed the doc-importlib-metadata-distributions branch from 0112ab6 to 2e597d1 Compare May 26, 2025 20:07
@emmatyping
Copy link
Member

Hey @ashm-dev ! I see we ended up both making PRs. Would you like to take a look at #134751 and incorporate anything you may find useful?

@ashm-dev
Copy link
Contributor Author

Hey @ashm-dev ! I see we ended up both making PRs. Would you like to take a look at #134751 and incorporate anything you may find useful?

Hi! Yes, I'll take a look now and add what's missing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

Documentation missing for importlib.metadata.distributions()
2 participants