On 29/05/2018 23:58, Guido van Rossum wrote: > Have we received complaints about other cases? Whenever thisĀ breaks > code for which I am responsible I just blush and fix it, I don't > complain. Repeating the same warning typically just causes warning > fatigue rather than helping anyone. >
Maybe what we need is to add a, possibly optional, or suppressible, warning whenever the import system encounters an implicit/indirect import? If an import that is working because the package we are importing it from has imported it from elsewhere, but it is not included in the __init__ for that package, then code authors will get some warning before the breakage and any blushes will really be due. If I was getting something along the lines of: Warning: Implicit Import in MyCode.py line 16 - import of os.errno is unsupported and may stop working on any update consider direct import. Then I would try to address it at the current version. I would be happy to try to implement this and think that the performance impact should be low. -- Steve (Gadget) Barnes Any opinions in this message are my personal opinions and do not reflect those of my employer. --- This email has been checked for viruses by AVG. http://www.avg.com _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/