Bassem Girgis <brgir...@gmail.com> added the comment: I Robert,
One use scenario is to run deployment tests for sourceless packages and to ensure the integrity of the production environment. Very useful in container environments! In regards to the looking for the __init__ file, it is obvious that the logic you mentioned is the reason behind that. However, if the unittest code used a standard way to figure out "loadable" packages, whatever that is, it would have captured the fact that python3 can indeed function with all pyc files. I would say the fix in here is a dirty one. A better way to solve it is to call a standard utility which can detect if a package is loadable. This would resolve this issue and help with any future changes in the standard as well. Best regards, Bassem Bassem Girgis, PhD Email: brgir...@gmail.com On Sat, Mar 31, 2018 at 8:52 PM, Robert Collins <rep...@bugs.python.org> wrote: > > Robert Collins <robe...@robertcollins.net> added the comment: > > Oh, and why look for __init__ - in part, because it predates namespace > packages, but also because unlike regular imports unittest will do negative > things like reading the entire filesystem otherwise. > > ---------- > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <https://bugs.python.org/issue32419> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32419> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com