Skip to content
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

MetadataPathFinder has find_distributions as a classmethod in CPython #484

Closed
jaraco opened this issue Mar 20, 2024 · 1 comment
Closed

Comments

@jaraco
Copy link
Member

jaraco commented Mar 20, 2024

Today I noticed that in CPython, the find_distributions is a classmethod:

@classmethod
def find_distributions(
cls, context=DistributionFinder.Context()
) -> Iterable["PathDistribution"]:

But it's an instance method in importlib_metadata. I think it can be made a classmethod in both cases to reduce the divergence. I'd like to investigate to see if there was a reason for the divergence.

@jaraco
Copy link
Member Author

jaraco commented Mar 20, 2024

It looks like the classmethod goes back to 83b48ec, suggesting the divergence happened as part of the integration effort with CPython, so probably could have been made a classmethod in importlib_metadata as well.

@jaraco jaraco closed this as completed in 47b14ac Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant