I think this would be a nice addition that would have a couple of additional benefits:
- It could help clearly eliminate one class of typosquatting if utlized on PyPI, perhaps by automatically setting up the kinds of redirects you described for sckit-learn. Users often are more aware of the import name of a package than the actual package name.
- If this data was collected across packages, it could be used to create something like the
command-not-found
tool for imports, which provides installation candidates forapt
given input:
$ pyt
Command 'pyt' not found, did you mean:
command 'py' from deb pythonpy
command 'iyt' from deb python3-yt
command 'pat' from deb dist
command 'yt' from deb python3-yt
command 'pyp' from deb pyp
command 'pytr' from deb pytrainer