In GitLab by @mhsmith on Jun 1, 2020, 22:33
The section "Extending the search algorithm" says that find_distributions must return an iterable. However, the current implementation actually requires an iteratOR, because it calls next here. So if someone writes a find_distributions which returns a list, this will fail.
Separately, the DistributionFinder.Context .name attribute is documented as indicating "names to match" (plural). However, it's actually just a single string.
Finally, it says that DistributionFinder.Context "may supply other relevant context". This is so vague as to be useless. If it's supposed to mean "we may add other properties in the future", isn't that true of any API?
In GitLab by @mhsmith on Jun 1, 2020, 22:33
The section "Extending the search algorithm" says that
find_distributionsmust return an iterable. However, the current implementation actually requires an iteratOR, because it callsnexthere. So if someone writes afind_distributionswhich returns a list, this will fail.Separately, the
DistributionFinder.Context.nameattribute is documented as indicating "names to match" (plural). However, it's actually just a single string.Finally, it says that
DistributionFinder.Context"may supply other relevant context". This is so vague as to be useless. If it's supposed to mean "we may add other properties in the future", isn't that true of any API?